projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(st_blocks): long -> off_t.
[gnulib.git]
/
lib
/
makepath.c
diff --git
a/lib/makepath.c
b/lib/makepath.c
index
4218e90
..
7631c48
100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-206,6
+206,8
@@
make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
while (1)
{
while (1)
{
+ int newly_created_dir = 1;
+
/* slash points to the leftmost unprocessed component of dirpath. */
basename_dir = slash;
/* slash points to the leftmost unprocessed component of dirpath. */
basename_dir = slash;
@@
-236,11
+238,12
@@
make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
else
{
/* DIRPATH already exists and is a directory. */
else
{
/* DIRPATH already exists and is a directory. */
+ newly_created_dir = 0;
}
}
}
}
- if (verbose_fmt_string != NULL)
-
error (0, 0
, verbose_fmt_string, dirpath);
+ if (
newly_created_dir &&
verbose_fmt_string != NULL)
+
fprintf (stderr
, verbose_fmt_string, dirpath);
if (owner != (uid_t) -1 && group != (gid_t) -1
&& chown (basename_dir, owner, group)
if (owner != (uid_t) -1 && group != (gid_t) -1
&& chown (basename_dir, owner, group)