summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index ef1680a..dd80004 100644
--- a/src/util.c
+++ b/src/util.c
@@ -548,6 +548,9 @@ int mkdir_p(const char *path, mode_t m) {
tmp[PATH_MAX-1] = 0;
normalize_path(tmp);
+
+ if (!tmp[0])
+ return 0;
for (b = tmp, quit = 0; !quit;) {