]> mj.ucw.cz Git - moe.git/blobdiff - isolate/isolate.c
Isolate: Fix creation of directories
[moe.git] / 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)