aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/make-path.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/make-path.c')
-rw-r--r--lib-src/make-path.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib-src/make-path.c b/lib-src/make-path.c
index 9409583b53b..6741aa34b95 100644
--- a/lib-src/make-path.c
+++ b/lib-src/make-path.c
@@ -37,14 +37,12 @@ int touchy_mkdir (path)
37{ 37{
38 struct stat buf; 38 struct stat buf;
39 39
40 fprintf (stderr, "mkdir (\"%s\")\n", path); 40 /* If PATH already exists and is a directory, return success. */
41
42 /* If the path already exists and is a directory, return success. */
43 if (stat (path, &buf) >= 0 41 if (stat (path, &buf) >= 0
44 && (buf.st_mode & S_IFMT) == S_IFDIR) 42 && (buf.st_mode & S_IFMT) == S_IFDIR)
45 return 0; 43 return 0;
46 44
47 /* Otherwise, try to make it. If path exists but isn't a directory, 45 /* Otherwise, try to make it. If PATH exists but isn't a directory,
48 this will signal an error. */ 46 this will signal an error. */
49 if (mkdir (path, 0777) < 0) 47 if (mkdir (path, 0777) < 0)
50 { 48 {