]> code.delx.au - gnu-emacs/commitdiff
* fileio.c (time_error_value): Check the right error number.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jul 2012 04:16:11 +0000 (21:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 5 Jul 2012 04:16:11 +0000 (21:16 -0700)
Problem reported by Troels Nielsen in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.

src/ChangeLog
src/fileio.c

index d55b24747178c4849029df239e8ac2008b1a6427..da76922819013dac6d7c605ff7e4a728dd4d0771 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fileio.c (time_error_value): Check the right error number.
+       Problem reported by Troels Nielsen in
+       <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
+
 2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
index 5905c0e55115fb9685875b9068930968bf9d387d..69ec7b0539275cd0e5ea82a5703b13ed33eba17d 100644 (file)
@@ -3218,7 +3218,7 @@ static EMACS_TIME
 time_error_value (int errnum)
 {
   EMACS_TIME t;
-  int ns = (errno == ENOENT || errno == EACCES || errno == ENOTDIR
+  int ns = (errnum == ENOENT || errnum == EACCES || errnum == ENOTDIR
            ? NONEXISTENT_MODTIME_NSECS
            : UNKNOWN_MODTIME_NSECS);
   EMACS_SET_SECS_NSECS (t, 0, ns);