[1mdiff --git a/src/app.c b/src/app.c[m
[1mindex 2b256025..1c782173 100644[m
[1m--- a/src/app.c[m
[1m+++ b/src/app.c[m
[36m@@ -1277,7 +1277,10 @@[m [mconst iString *downloadPathForUrl_App(const iString *url, const iString *mime) {[m
[m
const iString *temporaryPathForUrl_App(const iString *url, const iString *mime) {[m
iApp *d = &app_;[m
[31m-#if defined (P_tmpdir)[m
[32m+[m[32m#if defined (iPlatformMsys)[m
[32m+[m[32m iString * tmpPath = collectNew_String();[m
[32m+[m[32m const iRangecc tmpDir = range_String(collect_String(tempDirectory_Win32()));[m
[32m+[m[32m#elif defined (P_tmpdir)[m
iString * tmpPath = collectNew_String();[m
const iRangecc tmpDir = range_CStr(P_tmpdir);[m
#else[m
[1mdiff --git a/src/win32.c b/src/win32.c[m
[1mindex f5aba1ed..287c11e9 100644[m
[1m--- a/src/win32.c[m
[1m+++ b/src/win32.c[m
[36m@@ -26,6 +26,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m
#include "prefs.h"[m
#include "app.h"[m
[m
[32m+[m[32m#include <the_Foundation/path.h>[m[41m [m
#include <the_Foundation/sortedarray.h>[m
#include <SDL_syswm.h>[m
[m
[36m@@ -245,6 +246,21 @@[m [miString *windowsDirectory_Win32(void) {[m
return newUtf16_String(winDir);[m
}[m
[m
[32m+[m[32miString *tempDirectory_Win32(void) {[m[41m [m
[32m+[m[32m /* Calling GetTempPathW would just return C:\WINDOWS? A local config issue? */[m[41m [m
[32m+[m[32m WCHAR buf[32768];[m[41m [m
[32m+[m[32m if (GetEnvironmentVariableW(L"TMP", buf, sizeof(buf))) {[m[41m [m
[32m+[m[32m return newUtf16_String(buf);[m[41m [m
[32m+[m[32m }[m[41m [m
[32m+[m[32m if (GetEnvironmentVariableW(L"TEMP", buf, sizeof(buf))) {[m[41m [m
[32m+[m[32m return newUtf16_String(buf);[m[41m [m
[32m+[m[32m }[m[41m [m
[32m+[m[32m if (GetEnvironmentVariableW(L"USERPROFILE", buf, sizeof(buf))) {[m[41m [m
[32m+[m[32m return concatCStr_Path(collect_String(newUtf16_String(buf)), "AppData\Local\Temp");[m[41m [m
[32m+[m[32m }[m[41m [m
[32m+[m[32m return concatCStr_Path(collect_String(windowsDirectory_Win32()), "Temp");[m[41m [m
[32m+[m[32m}[m[41m [m
[32m+[m[41m [m
void useExecutableIconResource_SDLWindow(SDL_Window *win) {[m
HINSTANCE handle = GetModuleHandle(NULL);[m
HICON icon = LoadIcon(handle, "IDI_ICON1");[m
[1mdiff --git a/src/win32.h b/src/win32.h[m
[1mindex 1732f305..6e7882a9 100644[m
[1m--- a/src/win32.h[m
[1m+++ b/src/win32.h[m
[36m@@ -35,6 +35,7 @@[m [mvoid useExecutableIconResource_SDLWindow(SDL_Window *);[m
void enableDarkMode_SDLWindow(SDL_Window *);[m
void handleCommand_Win32(const char *cmd);[m
iString *windowsDirectory_Win32(void);[m
[32m+[m[32miString *tempDirectory_Win32(void);[m[41m [m
[m
#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME)[m
iInt2 cursor_Win32(void);[m
text/plain
This content has been proxied by September (ba2dc).