1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

Add my comment from ChangeLog entry for gkm's change.

This commit is contained in:
Jim Meyering
1998-02-11 22:17:38 +00:00
parent 5f8949c46c
commit 65978b6328

View File

@@ -217,6 +217,14 @@ make_path (const char *argpath,
if (!do_chdir)
basename_dir = dirpath;
/* The mkdir and stat calls below appear to be reversed.
They are not. It is important to call mkdir first and then to
call stat (to distinguish the three cases) only if mkdir fails.
The alternative to this approach is to `stat' each directory,
then to call mkdir if it doesn't exist. But if some other process
were to create the directory between the stat & mkdir, the mkdir
would fail with EEXIST. */
*slash = '\0';
if (mkdir (basename_dir, tmp_mode))
{