Subject: Re: bug#71972: 31.0.50; Tramp does not parse ipv6 address with port correctly

From: Yikai Zhao <[email-masked]>
Date: Sun, 7 Jul 2024 14:31:13 +0800

Hi,

Thanks for the patch. However, with this patch applied to master, the result is:

(tramp-dissect-file-name "/ssh:[2001::abcd]#2202:/tmp/xxx")
=> (tramp-file-name "ssh" nil nil #("Oldtown" 0 7 (tramp-default t))
"2202" "/tmp/xxx" nil) [2 times]

("oldtown" is my local hostname). Although the port is correctly
parsed, the host is now incorrect.

Also note that in master, the correct file path for tramp.el is
lisp/net/tramp.el, so I had to manually edit your patch before
applying it. What version is your patch based on? Maybe the result is
different in different versions?

On Sun, Jul 7, 2024 at 1:00 AM Michael Albinus <[email-masked]> wrote:
>
> Michael Albinus <[email-masked]> writes:
>
> Hi,
>
> > (tramp-dissect-file-name "/ssh:[2001::abcd]#2202:/tmp/xxx")
> > => (tramp-file-name "ssh" nil nil "2001::abcd#2202" nil "/tmp/xxx" nil)
> >
> > That is a structure, which has "2001::abcd#2202" as host name. Ouch.
> >
> > Will see how I could fix it.
>
> Could you please try the appended patch? It ought to fix the problem.
>
> Best regards, Michael.
>