unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 349798a9b8: Demote errors from utimensat copying directories
@ 2023-08-26  7:38 Eli Zaretskii
  2023-08-26  8:22 ` Po Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2023-08-26  7:38 UTC (permalink / raw)
  To: Po Lu, Bruno Haible; +Cc: emacs-devel, Paul Eggert

> 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-26 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26  7:38 master 349798a9b8: Demote errors from utimensat copying directories Eli Zaretskii
2023-08-26  8:22 ` Po Lu
2023-08-26  9:07   ` Eli Zaretskii
2023-08-26  9:33     ` Po Lu
2023-08-26 16:12   ` Paul Eggert
2023-08-26 16:40     ` errors from fchownat " Bruno Haible
2023-08-26 16:57       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).