Fix mkdir -p with a leading /

This commit is contained in:
sin
2015-04-20 17:39:50 +01:00
parent 9c03736696
commit 6e30efb9bb
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ mkdirp(char *path)
{
char *p;
for (p = path; *p; p++) {
for (p = path + (*path == '/'); *p; p++) {
if (*p != '/')
continue;
*p = '\0';