aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-10-14 17:53:11 -0400
committerAdam Harrison <adamdharrison@gmail.com>2024-10-14 17:53:11 -0400
commitbb61f8bf85c653d9bb14a47c869bba15cd970054 (patch)
tree19e93980a9552ab1fe448cc9e4b78d9f9f04c88d
parent41eda1fdc3c9be6b9bae4f6a3251826b4356966d (diff)
downloadlite-xl-plugin-manager-bb61f8bf85c653d9bb14a47c869bba15cd970054.tar.gz
lite-xl-plugin-manager-bb61f8bf85c653d9bb14a47c869bba15cd970054.zip
Fix windows and linux compiles.
-rwxr-xr-xbuild.sh2
-rw-r--r--src/lpm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index f1d3c04..7545ac6 100755
--- a/build.sh
+++ b/build.sh
@@ -11,7 +11,7 @@ SRCS="src/*.c"
COMPILE_FLAGS="$CFLAGS -Ilib/prefix/include" # We specifically rename this and LDFLAGS, because exotic build environments export these to subprcoesses.
LINK_FLAGS="$LDFLAGS -lm -Llib/prefix/lib -Llib/prefix/lib64" # And ideally we don't want to mess with the underlying build processes, unless we're explicit about it.
-[[ "$@" == "clean" ]] && rm -rf lib/libgit2/build lib/zlib/build lib/libzip/build lib/mbedtls/build lib/prefix lua $BIN *.exe src/lpm.luac src/lpm.lua.c && exit 0
+[[ "$@" == "clean" ]] && rm -rf lib/libgit2/build lib/zlib/build lib/libzip/build lib/xz/build lib/mbedtls/build lib/prefix lua $BIN *.exe src/lpm.luac src/lpm.lua.c && exit 0
cmake --version >/dev/null 2>/dev/null || { echo "Please ensure that you have cmake installed." && exit -1; }
# Build supporting libraries, libz, libmbedtls, libmbedcrypto, libgit2, libzip, libmicrotar, liblua
diff --git a/src/lpm.c b/src/lpm.c
index bb40a39..22532c5 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -855,7 +855,7 @@ static int mkdirp(lua_State* L, char* path, int len) {
if (path[i] == '/' && i > 0) {
path[i] = 0;
#ifdef _WIN32
- LPCSTR wpath = lua_toutf16(L, path);
+ LPCWSTR wpath = lua_toutf16(L, path);
if (_wmkdir(wpath) && errno != EEXIST) {
lua_pop(L, 1);
return -1;