summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/lynx/src/LYClean.c4
-rw-r--r--gnu/usr.bin/lynx/src/LYMain.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/lynx/src/LYClean.c b/gnu/usr.bin/lynx/src/LYClean.c
index 424560e6708..47a0700d9bc 100644
--- a/gnu/usr.bin/lynx/src/LYClean.c
+++ b/gnu/usr.bin/lynx/src/LYClean.c
@@ -142,6 +142,10 @@ PUBLIC void cleanup_files NOARGS
char filename[256];
tempname(filename, REMOVE_FILES);
+
+ if (rmdir(lynx_temp_space))
+ perror("Could not remove the temp-directory");
+
FREE(lynx_temp_space);
}
diff --git a/gnu/usr.bin/lynx/src/LYMain.c b/gnu/usr.bin/lynx/src/LYMain.c
index 2e600b1e325..ea59f4df0eb 100644
--- a/gnu/usr.bin/lynx/src/LYMain.c
+++ b/gnu/usr.bin/lynx/src/LYMain.c
@@ -742,6 +742,8 @@ else {init_ctrl_break[0] = 1;}
StrAllocCat(lynx_temp_space, ":");
}
#else
+ StrAllocCat(lynx_temp_space, "/lynx-XXXXXX");
+ lynx_temp_space = mkdtemp(lynx_temp_space);
#ifndef __DJGPP__
if (((len = strlen(lynx_temp_space)) > 1) &&
lynx_temp_space[len-1] != '/') {