emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108848: * fileio.c (Finsert_file_con


From: Andreas Schwab
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108848: * fileio.c (Finsert_file_contents): Properly handle st_mtime
Date: Wed, 04 Jul 2012 00:03:37 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108848
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Wed 2012-07-04 00:03:37 +0200
message:
  * fileio.c (Finsert_file_contents): Properly handle st_mtime
  marker for non-existing file.
modified:
  src/ChangeLog
  src/fileio.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-03 20:34:47 +0000
+++ b/src/ChangeLog     2012-07-03 22:03:37 +0000
@@ -1,3 +1,8 @@
+2012-07-03  Andreas Schwab  <address@hidden>
+
+       * fileio.c (Finsert_file_contents): Properly handle st_mtime
+       marker for non-existing file.  (Bug#11852)
+
 2012-07-03  Glenn Morris  <address@hidden>
 
        * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN

=== modified file 'src/fileio.c'
--- a/src/fileio.c      2012-07-03 18:24:42 +0000
+++ b/src/fileio.c      2012-07-03 22:03:37 +0000
@@ -4193,7 +4193,10 @@
 
       if (NILP (handler))
        {
-         current_buffer->modtime = get_stat_mtime (&st);
+         if (st.st_mtime == -1)
+           EMACS_SET_INVALID_TIME (current_buffer->modtime);
+         else
+           current_buffer->modtime = get_stat_mtime (&st);
          current_buffer->modtime_size = st.st_size;
          BVAR (current_buffer, filename) = orig_filename;
        }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]