aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-11-29 23:32:10 -0500
committerAdam Harrison <adamdharrison@gmail.com>2022-11-29 23:32:10 -0500
commite038c8cc6818dab3f8ccd4d78ae8797d591cc13f (patch)
treee065f07034c112edd1cdf4dd814259f773cd8c83 /src/lpm.c
parent2516b4c8ba540df06d6d325872c860bb705a387b (diff)
downloadlite-xl-plugin-manager-e038c8cc6818dab3f8ccd4d78ae8797d591cc13f.tar.gz
lite-xl-plugin-manager-e038c8cc6818dab3f8ccd4d78ae8797d591cc13f.zip
Added in preprocessor guard.
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 5b5eb1c..3e0021e 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -440,7 +440,11 @@ static int mkdirp(char* path, int len) {
for (int i = 0; i < len; ++i) {
if (path[i] == '/') {
path[i] = 0;
- if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) && errno != EEXIST)
+ #ifndef _WIN32
+ if (mkdir(path, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) && errno != EEXIST)
+ #else
+ if (mkdir(path) && errno != EEXIST)
+ #endif
return -1;
path[i] = '/';
}