From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.bugs Subject: bug#58842: 29.0.50/tramp; copy-file KEEP-TIME gives the target earlier time Date: Mon, 31 Oct 2022 11:33:13 -0400 Message-ID: References: <87v8o1jp2a.fsf@gmx.de> Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7643"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58842@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 31 16:34:42 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1opWoD-0001lx-Mq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 16:34:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opWns-0005rq-0Q; Mon, 31 Oct 2022 11:34:20 -0400 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 1opWnb-0005q9-91 for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 11:34:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opWna-0001ZG-Tv for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opWna-0007aT-F2 for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 11:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Steingold Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Oct 2022 15:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58842 X-GNU-PR-Package: emacs Original-Received: via spool by 58842-submit@debbugs.gnu.org id=B58842.166723040329119 (code B ref 58842); Mon, 31 Oct 2022 15:34:02 +0000 Original-Received: (at 58842) by debbugs.gnu.org; 31 Oct 2022 15:33:23 +0000 Original-Received: from localhost ([127.0.0.1]:41545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opWmw-0007Za-LQ for submit@debbugs.gnu.org; Mon, 31 Oct 2022 11:33:23 -0400 Original-Received: from mail-qv1-f45.google.com ([209.85.219.45]:46800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opWmu-0007ZO-Li for 58842@debbugs.gnu.org; Mon, 31 Oct 2022 11:33:21 -0400 Original-Received: by mail-qv1-f45.google.com with SMTP id u7so8524597qvn.13 for <58842@debbugs.gnu.org>; Mon, 31 Oct 2022 08:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:user-agent :references:in-reply-to:subject:cc:to:from:sender:from:to:cc:subject :date:message-id:reply-to; bh=pGCmVs52am6/Epw9hv9zjNXLhiwPmgMsYQWf98S1wFE=; b=hWD/qjwCivrhL38JRTAg3RM5oq7w1+E226C7YW9QTeHNI/EHFR7T/aVW6f3cL4A6bd 6sbuDZSpUTcfCc5Yv01V6+WgGwp8lZulUNWtbJ+ulsrB5fCoYrb7jd1LAwlPxNtlglX7 pW2FCyA9ovGvnwd3eKEENBGGfya1GezfLljrF0dbk5jsPRpDFc0Ls46K1qq7b4VHCqQh xaL+OxRqbpqoi+dbpWI7zNAXhH/Av3Z/0suBfp3h3WYokS8FozeCBxK4e+YwiUCH5J51 d1sOqJBH+6+M9g8c27dW/m7nkIxqPP2GuWefgQHUzafnuG1otEY1HrkVzjOJvRFp04jc Sjyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:reply-to:return-receipt-to:user-agent :references:in-reply-to:subject:cc:to:from:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pGCmVs52am6/Epw9hv9zjNXLhiwPmgMsYQWf98S1wFE=; b=Y89Fo+qmKGDO/4e63nQBSwYi4cL/hU01XWxoAtYnVlJxUNVYYjRkRfdaRYK74Ts5/3 /mLil8BZjnZH/8HTxNS6pTTRDWsG408XNfnUb9+VcbcHFED4WUDnHJTqhhmPFwv0AlsB WWzMXrI9729h9zp1hjDc+TlKlvElBrwOV0DtTdWmEwBYTbg4WJQIeSj2XAynqR9ZnaDv Q7pCvoj5r61y7670z549E/mO65ik+QEEWgbDSEtJS47oAigKj8+CLpZewudxfXexK268 W8uJn6TwTle4Ey/xbqcJ9wQGwr3l+wC190Ldp54vTnxStI3Pv+iVduVeixJ7osXSPslz ONGA== X-Gm-Message-State: ACrzQf1zYF1UNkSM+fqJim7XCUuEF89iFd7kO1Njd8XofHLB5WVo9hg9 vr+9M79NpHKGVuKDO/xbhA== X-Google-Smtp-Source: AMsMyM6r+/1+hQJT7+cPLODv/W06jrkK+K2wmRL9mQeSV+8HcUIxGOUC0G6OTwHmWSFX84dzpcDlIQ== X-Received: by 2002:a05:6214:20e7:b0:4bb:5e7e:715b with SMTP id 7-20020a05621420e700b004bb5e7e715bmr11421626qvk.20.1667230394917; Mon, 31 Oct 2022 08:33:14 -0700 (PDT) Original-Received: from 3c22fb11fdab.ant.amazon.com (pool-72-69-2-113.nycmny.fios.verizon.net. [72.69.2.113]) by smtp.gmail.com with ESMTPSA id b15-20020ac8540f000000b0039cc22a2c49sm3756371qtq.47.2022.10.31.08.33.14 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Oct 2022 08:33:14 -0700 (PDT) In-Reply-To: <87v8o1jp2a.fsf@gmx.de> (Michael Albinus's message of "Sun, 30 Oct 2022 16:42:21 +0100") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246700 Archived-At: Hi Michael, > * Michael Albinus [2022-10-30 16:42:21 +0100]: > > Sam Steingold writes: > >> One property of `copy-file' that I came to expect is: >> >> (copy-file src dst ...) is successful >> ==> >> (file-newer-than-file-p src dst) is false >> >> This ensures that the same file is not copied over and over. >> >> Alas, this does not hold in the following corner case: >> >> 1. src is local on mac >> 2. dst is remote on linux >> 3. KEEP-TIME is passed to `copy-file' >> >> In this case, after `(copy-file src dst t t)`, >> >> (file-attribute-modification-time (file-attributes dst)) >> => (25435 65247 0 0) >> (file-attribute-modification-time (file-attributes src)) >> => (25435 65247 279367 729000) >> > > Well, another fix would be to teach file-newer-than-file-p to use only > seconds w/o fractions. Does the appended patch works for you? > Yes, thank you, it does appear to fix the issue. Please note a typo in the comment in your patch. -- Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113 https://lastingimpactpsychology.com https://steingoldpsychology.com https://fairforall.org http://think-israel.org https://www.dhimmitude.org Two wrongs don't make a right, but three rights make a left.