diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-11-29 23:32:10 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-11-29 23:32:10 -0500 |
commit | e038c8cc6818dab3f8ccd4d78ae8797d591cc13f (patch) | |
tree | e065f07034c112edd1cdf4dd814259f773cd8c83 /src/lpm.c | |
parent | 2516b4c8ba540df06d6d325872c860bb705a387b (diff) | |
download | lite-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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] = '/'; } |