all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Devlin <spd@toadstyle.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 68805@debbugs.gnu.org
Subject: bug#68805: 29.2; Tramp: out-of-band copy-file fails when tramp-copy-keep-date is nil
Date: Thu, 1 Feb 2024 10:34:36 -0500	[thread overview]
Message-ID: <55A934E6-19B9-4EFC-BA64-25F35E4115B4@toadstyle.org> (raw)
In-Reply-To: <87a5okguqo.fsf@gmx.de>

Hi Michael,

I can confirm the below patch fixes the issue. Thanks for your help!

Regarding the comment, couldn’t some cached file properties (i.e. other than
file-exists-p) be wrong even if NEWNAME did already exist? I haven’t really
thought this through, just curious.

Thanks!

> On Feb 1, 2024, at 8:49 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
> 
> Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
> 
> Hi Sean,
> 
>> Thanks for the report and the analysis. It is correct. Could you please
>> check, whether this patch fixes it:
> 
> Oops, that's too lax. Pls try the following instead:
> 
> diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
> index 1301cd63..44c0bdc7 100644
> --- a/lisp/tramp-sh.el
> +++ b/lisp/tramp-sh.el
> @@ -2521,6 +2521,12 @@ The method used must be an out-of-band method."
> 	    ;; cached password).
> 	    (tramp-cleanup-connection v 'keep-debug 'keep-password))))
> 
> +      ;; The cached file properties might be wrong if NEWNAME didn't
> +      ;; exist.  Flush them.
> +      (when v2
> +	(with-parsed-tramp-file-name newname v2
> +	  (tramp-flush-file-properties v2 v2-localname)))
> +
>       ;; Handle KEEP-DATE argument.
>       (when (and keep-date (not copy-keep-date))
> 	(tramp-compat-set-file-times
> 
> Best regards, Michael.






  reply	other threads:[~2024-02-01 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 22:26 bug#68805: 29.2; Tramp: out-of-band copy-file fails when tramp-copy-keep-date is nil Sean Devlin
2024-02-01 13:29 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 13:49   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 15:34     ` Sean Devlin [this message]
2024-02-01 16:32       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-01 16:52         ` Sean Devlin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A934E6-19B9-4EFC-BA64-25F35E4115B4@toadstyle.org \
    --to=spd@toadstyle.org \
    --cc=68805@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.