aboutsummaryrefslogtreecommitdiff
path: root/lib/common/mkdir_p.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/mkdir_p.c')
-rw-r--r--lib/common/mkdir_p.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common/mkdir_p.c b/lib/common/mkdir_p.c
index 0413495..d250763 100644
--- a/lib/common/mkdir_p.c
+++ b/lib/common/mkdir_p.c
@@ -122,10 +122,10 @@ int mkdir_p(const char *path)
}
}
- if (!done) {
+ if (!done)
*end = '\\';
- ptr = end + 1;
- }
+
+ ptr = done ? end : (end + 1);
}
free(wpath);