unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Bruno Haible <bruno@clisp.org>,
	 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 16:22:32 +0800	[thread overview]
Message-ID: <87wmxi1ad3.fsf@yahoo.com> (raw)
In-Reply-To: <835y52meww.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 26 Aug 2023 10:38:39 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

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

Given that, I'll resort to disrearding such errors from set-file-times
only on the pertinent filesystems instead.

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

Gnulib is not relevant here, as the ``filesystems'' which fail are
implemented within androidvfs.c.



  reply	other threads:[~2023-08-26  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-26  7:38 master 349798a9b8: Demote errors from utimensat copying directories Eli Zaretskii
2023-08-26  8:22 ` Po Lu [this message]
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=87wmxi1ad3.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=bruno@clisp.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).