Mercurial > gnulib
changeset 19928:f818d5712379
.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 03 Jul 1994 13:18:31 +0000 |
parents | 010cd497b8e3 |
children | 9582c19f5d32 |
files | lib/makepath.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/makepath.c Sun Jul 03 12:48:38 1994 +0000 +++ b/lib/makepath.c Sun Jul 03 13:18:31 1994 +0000 @@ -206,7 +206,10 @@ /* 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);