1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

mkdtemp a directory where Lynx puts all it's temporary files.

Fixing creation of all temp files would involve rewriting Lynx.
This commit is contained in:
art 1998-10-28 18:01:04 +00:00
parent 380ba284eb
commit 39dbe45b79
2 changed files with 6 additions and 0 deletions

View File

@ -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);
}

View File

@ -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] != '/') {