problems restoring the history file are not signaled correctly to the calling application

This commit is contained in:
Chet Ramey 2020-02-07 14:58:55 -05:00 committed by Tom Tromey
parent c74251adf3
commit f5fb419ff3
2 changed files with 3 additions and 1 deletions

View File

@ -620,6 +620,7 @@ history_truncate_file (const char *fname, int lines)
if (rv != 0)
{
rv = errno;
if (tempname)
unlink (tempname);
history_lines_written_to_file = 0;
@ -767,6 +768,7 @@ mmap_error:
if (rv != 0)
{
rv = errno;
if (tempname)
unlink (tempname);
history_lines_written_to_file = 0;

View File

@ -1,3 +1,3 @@
# Do not edit -- exists only for use by patch
3
4