aboutsummaryrefslogtreecommitdiffstats
path: root/history.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2015-08-11 13:05:46 +0000
committerTatsuya Kinoshita <tats@debian.org>2015-08-11 13:05:46 +0000
commitaf52480aabcb700c9bf68989a5e6c648d22f9945 (patch)
tree17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /history.c
parentUpdate ChangeLog (diff)
parentCheck for presence of prevl before using (diff)
downloadw3m-af52480aabcb700c9bf68989a5e6c648d22f9945.tar.gz
w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.zip
Merge branch 'bug/sw3m'
Diffstat (limited to 'history.c')
-rw-r--r--history.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/history.c b/history.c
index e9be09b..f2a00b4 100644
--- a/history.c
+++ b/history.c
@@ -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 */