From ddb038c033eb6a9b1ba4820d6cc053411bedde40 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 28 Sep 2002 07:55:08 +0000 Subject: (make_path): Restore umask *before* creating the final component. --- lib/makepath.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/makepath.c b/lib/makepath.c index 007301077..4f954ba3a 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -355,6 +355,9 @@ make_path (const char *argpath, if (!do_chdir) basename_dir = dirpath; + /* Done creating leading directories. Restore original umask. */ + umask (oldmask); + /* We're done making leading directories. Create the final component of the path. */ @@ -364,9 +367,6 @@ make_path (const char *argpath, return 1; } - /* Done creating directories. Restore original umask. */ - umask (oldmask); - if (verbose_fmt_string != NULL) error (0, 0, verbose_fmt_string, quote (dirpath)); -- cgit v1.2.3-54-g00ecf