aboutsummaryrefslogtreecommitdiff
path: root/lib
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-24 12:34:21 +0100
commit1901937e66baf95145b71e878220bf1a129d32fb (patch)
treea6a6f72a32b3ae5e9e119dc98a12eaa8fd184334 /lib
parent1d0651367a3b900ebe99356ddcc1fc19fc0800d6 (diff)
Fix: libcommon: Correctly restore prefix path in mkdir_p on Windows
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-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);