(make_path): Reorder stat-then-mkdir-if-missing
authorJim Meyering <jim@meyering.net>
Tue, 1 Jul 1997 11:50:39 +0000 (11:50 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 1 Jul 1997 11:50:39 +0000 (11:50 +0000)
commitc897bea3055737f694ec4e322ef6a326c6c2c9ee
treecf87f13cf2e78d2173de87978732d7a35750e741
parent58dc681a9b810db4f7fc8b47d6c216bb169b7da4
(make_path): Reorder stat-then-mkdir-if-missing
calls so that mkdir is called first.  Before make_path would first
`stat' a directory, then call mkdir if it didn't exist.  But if
some other process created the directory between the stat & mkdir,
the mkdir would fail with EEXIST.  Diagnosis and suggestion from
Greg McGary.
lib/makepath.c