From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>, Bruno Haible <bruno@clisp.org>
Cc: emacs-devel@gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: Re: master 349798a9b8: Demote errors from utimensat copying directories
Date: Sat, 26 Aug 2023 10:38:39 +0300 [thread overview]
Message-ID: <835y52meww.fsf@gnu.org> (raw)
> 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.
next reply other threads:[~2023-08-26 7:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 7:38 Eli Zaretskii [this message]
2023-08-26 8:22 ` master 349798a9b8: Demote errors from utimensat copying directories 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835y52meww.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=bruno@clisp.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).