emacs-devel
[Top][All Lists]
Advanced

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

Re: file-equal-p


From: Eli Zaretskii
Subject: Re: file-equal-p
Date: Thu, 16 Feb 2023 10:57:16 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 16 Feb 2023 16:43:25 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Fix Haiku?  A 'stat' call accesses the directory and file's meta-data,
> > not the file itself, so what Haiku does makes no sense, IMO.
> >
> > But if you cannot fix Haiku, a suitable haiku-only change in
> > file-equal-p, whereby the access times are exempt from comparison, is
> > a possibility.
> 
> Something like this?

I'd prefer to have the original full comparison done first, and only
if it fails, do the tailored comparison only for Haiku.  That's
because most systems don't need this, and so testing the condition in
all cases will slow down those other systems.

> BTW, what if a file changes in between the calls to `file-atttributes'
> on any old GNU/Linux system?

Then we lose.  Any non-atomic file-related operation can be hit by
such race conditions.



reply via email to

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