problems restoring the history file are not signaled correctly to the calling application
authorChet Ramey <chet.ramey@case.edu>
Fri, 7 Feb 2020 19:58:55 +0000 (14:58 -0500)
committerTom Tromey <tom@tromey.com>
Tue, 30 Jun 2020 21:10:46 +0000 (15:10 -0600)
readline/readline/histfile.c
readline/readline/patchlevel

index 6c3adc9bd8d5e441f095c19eeeef9bef0a2ec46c..8eb3496687577213966c55f83d2540ca49dc1f14 100644 (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;
index ce3e35565330d4faf05e7f91c30ce66182f764fd..626a945e08fbd8926846afabedb8740ebf1720c7 100644 (file)
@@ -1,3 +1,3 @@
 # Do not edit -- exists only for use by patch
 
-3
+4