- if (stat (SSDATA (filename), &st) == 0)
- mtime = get_stat_mtime (&st);
- else
- {
- /* If the file doesn't exist now and didn't exist before,
- we say that it isn't modified, provided the error is a tame one. */
- int ns = (errno == ENOENT || errno == EACCES || errno == ENOTDIR
- ? NONEXISTENT_MODTIME_NSECS
- : UNKNOWN_MODTIME_NSECS);
- EMACS_SET_SECS_NSECS (mtime, 0, ns);
- }
+ mtime = (stat (SSDATA (filename), &st) == 0
+ ? get_stat_mtime (&st)
+ : time_error_value (errno));