Add option to set directory for temporary files
With this patch applied the user can configure a directory to store temporary/cache files. The history and cookies remain in RC_DIR. I suppose the intent of writing the history to a temp file first is to make the actual write an atomic operation. As rename() does not work across mount points, we need to handle the temp file for the history different to keep this behaviour. Add a new type for the temp history file and handle this case different when creating a temp file.
This commit is contained in:
@@ -64,7 +64,7 @@ saveHistory(Hist *hist, size_t size)
|
||||
|
||||
if (hist == NULL || hist->list == NULL)
|
||||
return;
|
||||
tmpf = tmpfname(TMPF_DFL, NULL)->ptr;
|
||||
tmpf = tmpfname(TMPF_HIST, NULL)->ptr;
|
||||
if ((f = fopen(tmpf, "w")) == NULL) {
|
||||
/* FIXME: gettextize? */
|
||||
disp_err_message("Can't open history", FALSE);
|
||||
|
Reference in New Issue
Block a user