1
0
Fork 0
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:
Wayne Davison 2002-02-16 09:21:34 +00:00
parent 3fd91a7b90
commit d35af383df

View file

@ -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;