diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-03-03 12:22:11 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-03-03 12:22:11 -0500 |
commit | 7d6a269d39c59afb520792f5d7b87ddb8076d370 (patch) | |
tree | cf68a95a104cc082b6ef8df33c4d46478116947b /src/lpm.c | |
parent | ff74a1c64d5069831d3f52e2a79d095f35285633 (diff) | |
download | lite-xl-plugin-manager-7d6a269d39c59afb520792f5d7b87ddb8076d370.tar.gz lite-xl-plugin-manager-7d6a269d39c59afb520792f5d7b87ddb8076d370.zip |
Fixed things up a bit.
Diffstat (limited to 'src/lpm.c')
-rw-r--r-- | src/lpm.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1366,6 +1366,15 @@ int main(int argc, char* argv[]) { lua_pushliteral(L, "/"); #endif lua_setglobal(L, "PATHSEP"); + #if _WIN32 + wchar_t tmpdir[MAX_PATH]; + DWORD length = GetTempPathW(MAX_PATH, tmpdir); + lua_toutf8(L, tmpdir); + #else + lua_pushstring(L, getenv("TMPDIR") ? getenv("TMPDIR") : P_tmpdir); + #endif + lua_setglobal(L, "SYSTMPDIR"); + lua_pushliteral(L, LITE_ARCH_TUPLE); lua_setglobal(L, "ARCH"); lua_pushliteral(L, LPM_DEFAULT_REPOSITORY); |