From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: file-equal-p Date: Thu, 16 Feb 2023 10:57:16 +0200 Message-ID: <838rgy7ztf.fsf@gnu.org> References: <87a61es8fh.fsf.ref@yahoo.com> <87a61es8fh.fsf@yahoo.com> <83fsb681me.fsf@gnu.org> <87pmaaq9ua.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28583"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 16 09:58:06 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSa5d-0007HE-AU for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Feb 2023 09:58:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSa5B-0003Tq-Az; Thu, 16 Feb 2023 03:57:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSa59-0003Ti-Sr for emacs-devel@gnu.org; Thu, 16 Feb 2023 03:57:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSa59-0001PU-J3; Thu, 16 Feb 2023 03:57:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KL5a0AgJ6ZKGvVzPn2T77el5K3aFbk1ZN1COUrLbDTQ=; b=p+uNlrn7OIfF 4X5Wcle9L50atX61bkIlT507ABG3Z+oROq7KPD6D1J2nvzJoghsap4Rk4FZ4triQavQ2Y8V/3PIrs LfboKVid+GGIM9c9TIKY5XeJ2wmU0tj50T61hHJANoHD4M/t5D6X7azJkvRuvze968D2BO53BttQX j/mhu66A12nZnnHdKyGrN5keGScLQ1EtH+teIdnDIIYqd7tSYY95xz70+JOs2UmANFwDOhKT/L31z mQgzV4H/aD5ONLdAnP0YfwHMs7yWjNeQp6s3POW6YRJjweTaWwtpRU8sQf5zd5PhdbHFMoa3uelag nxbFUqeS6BLERrVcLD10vA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSa58-00014f-Uc; Thu, 16 Feb 2023 03:57:35 -0500 In-Reply-To: <87pmaaq9ua.fsf@yahoo.com> (message from Po Lu on Thu, 16 Feb 2023 16:43:25 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303386 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Thu, 16 Feb 2023 16:43:25 +0800 > > Eli Zaretskii 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.