Mercurial > hg > octave-kai > gnulib-hg
changeset 1053:433d747aceae
(make_path): Print message IFF the directory was
just created and the format string is non-NULL.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 06 Oct 1997 13:03:29 +0000 |
parents | 7fa4534226de |
children | 57d3cdbd65cf |
files | lib/makepath.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/makepath.c +++ b/lib/makepath.c @@ -206,6 +206,8 @@ while (1) { + int newly_created_dir = 1; + /* slash points to the leftmost unprocessed component of dirpath. */ basename_dir = slash; @@ -236,10 +238,11 @@ else { /* DIRPATH already exists and is a directory. */ + newly_created_dir = 0; } } - if (verbose_fmt_string != NULL) + if (newly_created_dir && verbose_fmt_string != NULL) error (0, 0, verbose_fmt_string, dirpath); if (owner != (uid_t) -1 && group != (gid_t) -1