From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57353: [PATCH] Fix parse-colon-path with UNC directory names Date: Tue, 23 Aug 2022 16:21:17 +0300 Message-ID: <83bksb859u.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11478"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57353@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 23 15:22:15 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 1oQTrC-0002nm-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 15:22:14 +0200 Original-Received: from localhost ([::1]:54624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQTrB-0003LL-2i for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Aug 2022 09:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTr0-0003Jx-FM for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQTr0-0005aj-76 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQTqz-0002aT-Q5 for bug-gnu-emacs@gnu.org; Tue, 23 Aug 2022 09:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Aug 2022 13:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 57353-submit@debbugs.gnu.org id=B57353.16612608789895 (code B ref 57353); Tue, 23 Aug 2022 13:22:01 +0000 Original-Received: (at 57353) by debbugs.gnu.org; 23 Aug 2022 13:21:18 +0000 Original-Received: from localhost ([127.0.0.1]:42950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQTqH-0002ZX-Nm for submit@debbugs.gnu.org; Tue, 23 Aug 2022 09:21:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQTqG-0002ZI-Vx for 57353@debbugs.gnu.org; Tue, 23 Aug 2022 09:21:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTqB-0005Wu-LM; Tue, 23 Aug 2022 09:21:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=SnGF5AgbBhYGHhJMvPP13ek8yIM+QbdWsLWRIYI/DRU=; b=EuvABS4YR0Zw tkWq4ptOgDjA+1FmPPPhNuapMPYVDlGbyHVE0lH9yFAW2Tx+4r5BwUbaWnWPI15FsjyMTYwKmRDTF +OL6mlofxviVG1XSy5Ifbegbg2RfoDsffC2XFQysZFXZMcuCshIEA5FWzb33Vg6TGxB/OP6cexYL1 rQfEBbhsS3MbJ3P0wNvaOk0fPCSeKpRXqb/OWBVXpph8GxB0/o2NCzVfakfkY/Ab4BzSWGHo2LJQ4 lZuEQo2PrtW7qJj0uLxabppZScTROl2YNJV8sxN/Qw6zwXMH2ObKQ1l/SZAOSXsHpSBeIwgcJ7M3n WatUcpklx7qOqhR6okhLhg==; Original-Received: from [87.69.77.57] (port=2754 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQTqB-0002ZP-4S; Tue, 23 Aug 2022 09:21:11 -0400 In-Reply-To: (message from Richard Copley on Tue, 23 Aug 2022 12:34:02 +0100) 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240540 Archived-At: > From: Richard Copley > Date: Tue, 23 Aug 2022 12:34:02 +0100 > > A comment in `parse-colon-path' says: > > ;; Previous implementation used `substitute-in-file-name' > ;; which collapse multiple "/" in front. Do the same for > ;; backward compatibility. > > However, `substitute-in-file-name' does not do that: > > (substitute-in-file-name "//foo/a/b") // -> "//foo/a/b" That is true, but: (substitute-in-file-name "///foo/a/b") => "//foo/a/b" So it does collapse multiple "/", at least sometimes. Moreover, the above is on MS-Windows, but on GNU/Linux: (substitute-in-file-name "///foo/a/b") => "/foo/a/b" So (a) this is system-dependent, and (b) substitute-in-file-name does collapse multiple slashes, but preserves UNCs on MS-Windows. Therefore, your patch needs some (minor) amendments.