From 1901937e66baf95145b71e878220bf1a129d32fb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 24 Nov 2021 12:21:45 +0100 Subject: Fix: libcommon: Correctly restore prefix path in mkdir_p on Windows Signed-off-by: David Oberhollenzer --- lib/common/mkdir_p.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3