projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New file to override autoconf's AC_SEARCH_LIBS.
[gnulib.git]
/
lib
/
makepath.c
diff --git
a/lib/makepath.c
b/lib/makepath.c
index
4a758e3
..
20e9a12
100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-162,6
+162,7
@@
make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
if (!created_dir)
{
struct stat stats;
if (!created_dir)
{
struct stat stats;
+ int saved_errno = errno;
/* The mkdir and stat calls below may appear to be reversed.
They are not. It is important to call mkdir first and then to
/* The mkdir and stat calls below may appear to be reversed.
They are not. It is important to call mkdir first and then to
@@
-173,7
+174,7
@@
make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p)
if (stat (dir, &stats))
{
if (stat (dir, &stats))
{
- error (0, errno, _("cannot create directory `%s'"), dirpath);
+ error (0,
saved_
errno, _("cannot create directory `%s'"), dirpath);
fail = 1;
}
else if (!S_ISDIR (stats.st_mode))
fail = 1;
}
else if (!S_ISDIR (stats.st_mode))