Subject: Re: bug#32304: 27.0.50; tramp-tests issue with double slash

From: Michael Albinus <[email-masked]>
Date: Tue, 31 Jul 2018 22:57:53 +0200

Andy Moreton <[email-masked]> writes:

Hi Andy,

> POSIX specifies that "//" is handled in an implementation defined
> manner, so Cygwin and Windows are not really special.
>
> See POSIX section 4.13 Pathname Resolution:
>
>     A pathname consisting of a single <slash> shall resolve to the root
>     directory of the process. A null pathname shall not be successfully
>     resolved. If a pathname begins with two successive <slash> characters,
>     the first component following the leading <slash> characters may be
>     interpreted in an implementation-defined manner, although more than two
>     leading <slash> characters shall be treated as a single <slash>
>     character.

But the Emacs implementation handles only Cygwin and MS Windows as
special. This is POSIX conform, because it declares this as
implementation specific.

The question is, whether Tramp should follow this. It does

(substitute-in-file-name "/ssh::/a///b") => "/b"

Maybe, it shall return on Cygwin and MS-Windows

(substitute-in-file-name "/ssh::/a///b") => "//b"

Don't know. Is this too sophisticated?

Best regards, Michael.