diff options
Diffstat (limited to 'src/filepath.c')
-rw-r--r-- | src/filepath.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/filepath.c b/src/filepath.c index 349b525..2186881 100644 --- a/src/filepath.c +++ b/src/filepath.c @@ -119,9 +119,8 @@ void mkpath(char *path, mode_t mode) { for (p=strchr(path+1, '/'); p; p=strchr(p+1, '/')) { *p = '\0'; - if (mkdir(path, mode) == -1) - if (errno != EEXIST) - fatal("redo: failed to mkdir() '%s'", path); + if (mkdir(path, mode) == -1 && errno != EEXIST) + fatal("redo: failed to mkdir() '%s'", path); *p = '/'; } |