]> mj.ucw.cz Git - moe.git/commitdiff
Isolate: Fix creation of directories
authorMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 14:02:08 +0000 (16:02 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 14:02:08 +0000 (16:02 +0200)
isolate/isolate.c

index 779ba199ddd38d2c80025877484ffae6acac5b49..b1590bde25000d6ec9e5b27528e41d21ace60396 100644 (file)
@@ -485,14 +485,7 @@ static void make_dir(char *path)
       if (sep)
        *sep = 0;
 
-      if (dir_exists(path))
-       {
-         if (sep)
-           *sep = '/';
-         return;
-       }
-
-      if (mkdir(path, 0777) < 0)
+      if (!dir_exists(path) && mkdir(path, 0777) < 0)
        die("Cannot create directory %s: %m\n", path);
 
       if (!sep)