(file-attributes directory))))
(follow-flag (unless follow 'nofollow)))
(if modes (set-file-modes newname modes follow-flag))
- (if times (set-file-times newname times follow-flag)))))))
+ (when times
+ ;; Don't didactically fail if file times can't be set, as
+ ;; some file systems forbid modifying them.
+ (with-demoted-errors "Setting file times: %s"
+ (set-file-times newname times follow-flag))))))))
\f
;; At time of writing, only info uses this.
ts[1] = get_stat_mtime (&st);
if (futimens (ofd, ts) != 0
/* Various versions of the Android C library are missing
- futimens, which leads a gnulib fallback to be installed
- that uses fdutimens instead. However, fdutimens is not
+ futimens, prompting Gnulib to install a fallback that
+ uses fdutimens instead. However, fdutimens is not
supported on many Android kernels, so just silently fail
if errno is ENOTSUP or ENOSYS. */
#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY