diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1109,8 +1109,13 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { | |||
1109 | 1109 | ||
1110 | const iString *temporaryPathForUrl_App(const iString *url, const iString *mime) { | 1110 | const iString *temporaryPathForUrl_App(const iString *url, const iString *mime) { |
1111 | iApp *d = &app_; | 1111 | iApp *d = &app_; |
1112 | iString *tmpPath = collectNewCStr_String(tmpnam(NULL)); | 1112 | #if defined (P_tmpdir) |
1113 | iString * tmpPath = collectNew_String(); | ||
1114 | const iRangecc tmpDir = range_CStr(P_tmpdir); | ||
1115 | #else | ||
1116 | iString * tmpPath = collectNewCStr_String(tmpnam(NULL)); | ||
1113 | const iRangecc tmpDir = dirName_Path(tmpPath); | 1117 | const iRangecc tmpDir = dirName_Path(tmpPath); |
1118 | #endif | ||
1114 | set_String( | 1119 | set_String( |
1115 | tmpPath, | 1120 | tmpPath, |
1116 | collect_String(concat_Path(collectNewRange_String(tmpDir), fileNameForUrl_App(url, mime)))); | 1121 | collect_String(concat_Path(collectNewRange_String(tmpDir), fileNameForUrl_App(url, mime)))); |