diff --git a/helpers.c b/helpers.c index a366474e..e7df1809 100644 --- a/helpers.c +++ b/helpers.c @@ -25,6 +25,7 @@ int makepath(char *p) do { do { *x++ = *p++; } while (*p && *p != '/'); + *x = 0; ret = mkdir(path, 0777); } while (*p && (*p != '/' || *(p + 1))); /* ignore trailing slash */