mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-29 06:51:03 +02:00
When savehistfile() rewrites the history file, there was a potential for
losing the entire history file if we couldn't lock the file for reading (it timed out) but we could lock the file for write (and wrote nothing).
This commit is contained in:
parent
3fd91a7b90
commit
d35af383df
1 changed files with 2 additions and 1 deletions
|
@ -2083,7 +2083,8 @@ savehistfile(char *fn, int err, int writeflags)
|
|||
hist_ignore_all_dups |= isset(HISTSAVENODUPS);
|
||||
readhistfile(fn, err, 0);
|
||||
hist_ignore_all_dups = isset(HISTIGNOREALLDUPS);
|
||||
savehistfile(fn, err, 0);
|
||||
if (histlinect)
|
||||
savehistfile(fn, err, 0);
|
||||
deletehashtable(histtab);
|
||||
|
||||
curhist = remember_curhist;
|
||||
|
|
Loading…
Reference in a new issue