emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 95b1eacd47: Fix handling of UNCs in 'parse-colon-path


From: Ken Brown
Subject: Re: master 95b1eacd47: Fix handling of UNCs in 'parse-colon-path
Date: Wed, 24 Aug 2022 18:03:35 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2

On 8/24/2022 2:48 PM, Eli Zaretskii wrote:
Date: Wed, 24 Aug 2022 14:34:02 -0400
From: Ken Brown <kbrown@cornell.edu>

On 8/24/2022 12:20 PM, Eli Zaretskii wrote:
branch: master
commit 95b1eacd4750da7329380aabcb383a8f9d96a59b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

      Fix handling of UNCs in 'parse-colon-path
* lisp/files.el (parse-colon-path): Don't remove the second
      leading slash on systems that support UNCs.  (Bug#57353)
* test/lisp/files-tests.el (files-tests-bug-21454): Update
      expected results.
      (files-colon-path): Add a new test pattern.

After this commit I'm getting the following test failure on Cygwin.  I don't
have time to look into it now, but I can do so in a few days if the fix isn't
obvious.

Ugh, it means the test data needs to be split three-way: one for
MS-Windows/MS-DOS, another for Cygwin, and one more for the rest.
Because Cygwin is like Posix systems, but it does want to support
UNCs.

It's not just the test data that's wrong on Cygwin, but parse-colon-path is wrong: It always collapses multiple leading slashes to two.

Posix says that multiple leading slashes are equivalent to one slash *except* in the case of exactly two leading slashes. In that case, the interpretation is implementation-dependent.

Cygwin follows Posix and chooses to interpret precisely two leading slashes as referring to a UNC path. In particular, 3 or more slashes should be collapsed to 1 slash, as on other Posix systems, while exactly 2 leading slashes should be left alone.

Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]