Subject: CVS commit: src/bin/mkdir
To: None <email@example.com>
From: Luke Mewburn <firstname.lastname@example.org>
Date: 03/05/2003 05:58:46
Module Name: src
Committed By: lukem
Date: Wed Mar 5 03:58:45 UTC 2003
Rework -p support again;
- If mkdir() fails on a component (no matter what the error is),
stat() the result. If the stat() fails, print the error mkdir() generated.
Otherwise, if the result is not a directory, explicitly fail with ENOTDIR.
- Move the chmod() of last element to be done only if the mkdir() succeeded
(i.e, it wasn't an existing directory)
Fixes problem introduced in previous commit where "mkdir -p existing"
on a read-only file system would incorrectly return a non zero exit code,
whilst retaining the race-condition fix of the previous commit.
Thanks to simonb@ for sanity checking my fix versus the standards.
To generate a diff of this commit:
cvs rdiff -r1.27 -r1.28 src/bin/mkdir/mkdir.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.