projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge with 1.10e
[gnulib.git]
/
lib
/
makepath.c
diff --git
a/lib/makepath.c
b/lib/makepath.c
index
9e70ed7
..
4d647b5
100644
(file)
--- a/
lib/makepath.c
+++ b/
lib/makepath.c
@@
-21,8
+21,8
@@
#ifdef HAVE_CONFIG_H
#if defined (CONFIG_BROKETS)
/* We use <config.h> instead of "config.h" so that a compilation
#ifdef HAVE_CONFIG_H
#if defined (CONFIG_BROKETS)
/* We use <config.h> instead of "config.h" so that a compilation
- using -I. -I
will use ./config.h rather than
/config.h
- (which it would do because it found this file in ). */
+ using -I. -I
$srcdir will use ./config.h rather than $srcdir
/config.h
+ (which it would do because it found this file in
$srcdir
). */
#include <config.h>
#else
#include "config.h"
#include <config.h>
#else
#include "config.h"
@@
-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. */
/* 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);
{
error (0, errno, "cannot make directory `%s'", dirpath);
umask (oldmask);