]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #9139 with revisiting non-existent files.
authorEli Zaretskii <eliz@gnu.org>
Sun, 11 Sep 2011 05:52:07 +0000 (01:52 -0400)
committerEli Zaretskii <eliz@gnu.org>
Sun, 11 Sep 2011 05:52:07 +0000 (01:52 -0400)
 src/fileio.c (Finsert_file_contents): If the file cannot be opened,
 set its "size" to -1.  This will set the modtime_size field of
 the corresponding buffer to -1, which is what
 verify-visited-file-modtime expects for files that do not exist.

src/ChangeLog
src/fileio.c

index da0576fdb46de0111d251df431efc7c5d202a860..d9891e457ac1effaf402f5b7b405b57625c31ed2 100644 (file)
@@ -1,3 +1,11 @@
+2011-09-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * fileio.c (Finsert_file_contents): If the file cannot be opened,
+       set its "size" to -1.  This will set the modtime_size field of
+       the corresponding buffer to -1, which is what
+       verify-visited-file-modtime expects for files that do not exist.
+       (Bug#9139)
+
 2011-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
index 2b31e18442bb28c835483ce0b088d071521c307b..2c478bac98ffabb7b31b1963bf56e37921e6fbcc 100644 (file)
@@ -3253,6 +3253,7 @@ variable `last-coding-system-used' to the coding system actually used.  */)
       if (NILP (visit))
        report_file_error ("Opening input file", Fcons (orig_filename, Qnil));
       st.st_mtime = -1;
+      st.st_size = -1;
       how_much = 0;
       if (!NILP (Vcoding_system_for_read))
        Fset (Qbuffer_file_coding_system, Vcoding_system_for_read);