From 0bc74a99b362a7ef58655bf3d4b29d5699c38c90 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 24 Feb 2018 20:07:08 +0100 Subject: blogc: make: mkdir may raise ENOENT --- src/blogc-make/exec-native.c | 2 +- src/blogc/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blogc-make/exec-native.c b/src/blogc-make/exec-native.c index ae5517d..4a31c88 100644 --- a/src/blogc-make/exec-native.c +++ b/src/blogc-make/exec-native.c @@ -40,7 +40,7 @@ bm_exec_native_cp(bm_filectx_t *source, bm_filectx_t *dest, bool verbose) *tmp = '\0'; if ((strlen(fname) > 0) && (-1 == mkdir(fname, 0777)) && - (errno != EEXIST)) + (errno != EEXIST && errno != ENOENT)) { fprintf(stderr, "blogc-make: error: failed to create output " "directory (%s): %s\n", fname, strerror(errno)); diff --git a/src/blogc/main.c b/src/blogc/main.c index d72091e..bfa3ea9 100644 --- a/src/blogc/main.c +++ b/src/blogc/main.c @@ -101,7 +101,7 @@ blogc_mkdir_recursive(const char *filename) #else (-1 == mkdir(fname, 0777)) && #endif - (errno != EEXIST)) + (errno != EEXIST && errno != ENOENT)) { fprintf(stderr, "blogc: error: failed to create output " "directory (%s): %s\n", fname, strerror(errno)); -- cgit v1.2.3-18-g5258