From 146a08ca25be72049c5385e6484291f08012d78b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 21 Nov 2002 09:44:27 +0000 Subject: [PATCH] (make_path): Restore umask *before* creating the final component. --- lib/makepath.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/makepath.c b/lib/makepath.c index fbe3f6a65e..26cb98634c 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -347,6 +347,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. */ @@ -356,9 +359,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)); -- 2.30.2