emacs-devel
[Top][All Lists]
Advanced

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

Re: master 349798a9b8: Demote errors from utimensat copying directories


From: Eli Zaretskii
Subject: Re: master 349798a9b8: Demote errors from utimensat copying directories
Date: Sat, 26 Aug 2023 10:38:39 +0300

> diff --git a/lisp/files.el b/lisp/files.el
> index 1803eb9..a015dd3 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -6622,7 +6622,11 @@ copy-directory
>                                      (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))))))))

I think we should only demote these errors on Android, not on other
systems.  Setting correct file times when copying/modifying files is
an important feature, and users should be alerted when it somehow
fails, unless the failure is expected.  And it only is expected on
Android, AFAIU.

Alternatively, the Gnulib folks (CC'd) should modify their fdutimens
replacement to return ENOSYS/ENOTSUP on Android filesystems.



reply via email to

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