projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d73b773
)
.
author
Jim Meyering
<jim@meyering.net>
Sun, 3 Jul 1994 13:18:31 +0000
(13:18 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sun, 3 Jul 1994 13:18:31 +0000
(13:18 +0000)
lib/makepath.c
patch
|
blob
|
history
diff --git
a/lib/makepath.c
b/lib/makepath.c
index bb6a09c12ca8f895a6cac13a039c85213a3c1fb2..4d647b5ef3160a5bcdd1cf8c80bdd7b51a1b3f34 100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-206,7
+206,10
@@
make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string)
/* We're done making leading directories.
Make the final component of the path. */
- if (mkdir (dirpath, mode))
+ /* The path could end in "/." or contain "/..", so test
+ if we really have to create the directory. */
+
+ if (stat (dirpath, &stats) && mkdir (dirpath, mode))
{
error (0, errno, "cannot make directory `%s'", dirpath);
umask (oldmask);