aboutsummaryrefslogtreecommitdiffstats
path: root/history.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:47 +0000
committerTatsuya Kinoshita <tats@debian.org>2021-01-02 00:20:47 +0000
commita722a562112506c63c9b6519b8252d633534a35a (patch)
tree78dc4b8bbefa910007339970eaf004f012d2082f /history.c
parentSwitch upstream to Debian's w3m (diff)
parentNew upstream version 0.5.3+git20210102 (diff)
downloadw3m-a722a562112506c63c9b6519b8252d633534a35a.tar.gz
w3m-a722a562112506c63c9b6519b8252d633534a35a.zip
Update upstream source from tag 'upstream/0.5.3+git20210102'
Update to upstream version '0.5.3+git20210102' with Debian dir e89c066385156d7c9ed01b0c8a1a08e01019959d
Diffstat (limited to 'history.c')
-rw-r--r--history.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/history.c b/history.c
index 951ef83..f2a00b4 100644
--- a/history.c
+++ b/history.c
@@ -17,7 +17,7 @@ historyBuffer(Hist *hist)
for (item = hist->list->last; item; item = item->prev) {
q = html_quote((char *)item->ptr);
if (DecodeURL)
- p = html_quote(url_unquote_conv((char *)item->ptr, 0));
+ p = html_quote(url_decode2((char *)item->ptr, NULL));
else
p = q;
Strcat_charp(src, "<li><a href=\"");
@@ -60,6 +60,7 @@ saveHistory(Hist *hist, size_t size)
FILE *f;
HistItem *item;
char *tmpf;
+ int rename_ret;
if (hist == NULL || hist->list == NULL)
return;
@@ -79,7 +80,11 @@ saveHistory(Hist *hist, size_t size)
disp_err_message("Can't save history", FALSE);
return;
}
- rename(tmpf, rcFile(HISTORY_FILE));
+ rename_ret = rename(tmpf, rcFile(HISTORY_FILE));
+ if (rename_ret != 0) {
+ disp_err_message("Can't save history", FALSE);
+ return;
+ }
}
#endif /* USE_HISTORY */