From 0b1da019756d9b17205bc77fbd060280830468d4 Mon Sep 17 00:00:00 2001 From: Ivan Mahonin Date: Sep 17 2024 08:18:38 +0000 Subject: fix makeDirectory --- diff --git a/src/common.c b/src/common.c index 2639554..4e289a8 100644 --- a/src/common.c +++ b/src/common.c @@ -145,9 +145,8 @@ int directoryExists(const char *path) { return stat(path, &s) == 0 && (s.st_mode & S_IFDIR); } -int makeDirectory(const char *path) { - return mkdir(path, 0777); -} +int makeDirectory(const char *path) + { return directoryExists(path) || !mkdir(path, 0777); } char* heliStringCopy(const char *x) {