summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index 65f6fde6..229fde75 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1109,8 +1109,13 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) {
1109 1109
1110const iString *temporaryPathForUrl_App(const iString *url, const iString *mime) { 1110const 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))));