From: Martin Mares Date: Sat, 21 Apr 2012 14:02:08 +0000 (+0200) Subject: Isolate: Fix creation of directories X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e164913cd68dcb6cead16cc8b545826d85119b74;p=moe.git Isolate: Fix creation of directories --- diff --git a/isolate/isolate.c b/isolate/isolate.c index 779ba19..b1590bd 100644 --- a/isolate/isolate.c +++ b/isolate/isolate.c @@ -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)