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: Po Lu
Subject: Re: master 349798a9b8: Demote errors from utimensat copying directories
Date: Sat, 26 Aug 2023 16:22:32 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

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