diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
commit | af52480aabcb700c9bf68989a5e6c648d22f9945 (patch) | |
tree | 17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /history.c | |
parent | Update ChangeLog (diff) | |
parent | Check for presence of prevl before using (diff) | |
download | w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.tar.gz w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.zip |
Merge branch 'bug/sw3m'
Diffstat (limited to 'history.c')
-rw-r--r-- | history.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 */ |