From 2d8f3c34f30ca6930b5e0314eaa49c2bf6c09219 Mon Sep 17 00:00:00 2001 From: Tharre Date: Mon, 25 May 2015 00:22:33 +0200 Subject: Small rename and code simplification --- src/filepath.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/filepath.c') 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 = '/'; } -- cgit v1.2.3-70-g09d2