summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-11-24 12:21:45 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-11-25 22:18:02 +0100
commit814a50bff99e3dabb86c7f31fb3e110ed5b5debd (patch)
treefc49cd87d76d75e9a96d4ce841d7dd0ecb495100
parent0d2125014c22caf55b0e5f3cfe11aa516cd6c2e3 (diff)
Fix: libcommon: Correctly restore prefix path in mkdir_p on Windows
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-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);