Fix string termination in path creation

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka
2008-02-22 18:00:48 -03:00
parent a1de36c163
commit d05900368f
+1
View File
@@ -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 */