unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Ken Brown <kbrown@cornell.edu>
Cc: 32304@debbugs.gnu.org
Subject: bug#32304: 27.0.50; tramp-tests issue with double slash
Date: Mon, 30 Jul 2018 12:43:46 +0200	[thread overview]
Message-ID: <874lghdmvx.fsf@gmx.de> (raw)
In-Reply-To: <63b21ac4-2f44-9e1a-bf0a-3242e6a1b9ed@cornell.edu> (Ken Brown's message of "Sun, 29 Jul 2018 12:47:43 -0400")

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Ken Brown <kbrown@cornell.edu> writes:

> Hi Michael,

Hi Ken,

> I think something further must be needed.  The test still fails in the
> same way.

There's another patch, could you pls check?

> Best regards,
>
> Ken

Best regards, Michael.


[-- Attachment #2: Type: text/plain, Size: 1410 bytes --]

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index d56b09a604..1af2defd58 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3567,16 +3567,20 @@ tramp-handle-substitute-in-file-name
     ;; First, we must replace environment variables.
     (setq filename (tramp-replace-environment-variables filename))
     (with-parsed-tramp-file-name filename nil
-      ;; We do not want to replace environment variables, again.
+      ;; We do not want to replace environment variables, again.  "//"
+      ;; has a special meaning at the beginning of a file name on
+      ;; Cygwin and MS-Windows, we must remove it.
       (let (process-environment)
 	;; Ignore in LOCALNAME everything before "//" or "/~".
 	(when (stringp localname)
 	  (if (string-match "//\\(/\\|~\\)" localname)
-	      (setq filename (substitute-in-file-name localname))
+	      (setq filename
+                    (replace-regexp-in-string
+                     "\\`/+" "/" (substitute-in-file-name localname)))
 	    (setq filename
 		  (concat (file-remote-p filename)
-			  (tramp-run-real-handler
-			   'substitute-in-file-name (list localname)))))))
+			  (replace-regexp-in-string
+                           "\\`/+" "/" (substitute-in-file-name localname)))))))
       ;; "/m:h:~" does not work for completion.  We use "/m:h:~/".
       (if (and (stringp localname) (string-equal "~" localname))
 	  (concat filename "/")

  parent reply	other threads:[~2018-07-30 10:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 15:54 bug#32304: 27.0.50; tramp-tests issue with double slash Ken Brown
2018-07-29 16:27 ` Michael Albinus
2018-07-29 16:47   ` Ken Brown
2018-07-29 16:55     ` Michael Albinus
2018-07-29 17:00       ` Ken Brown
2018-07-30 10:43     ` Michael Albinus [this message]
2018-07-30 12:17       ` Ken Brown
2018-07-30 14:45         ` Eli Zaretskii
2018-07-30 20:50           ` Michael Albinus
2018-07-31  2:34             ` Eli Zaretskii
2018-07-31  5:00               ` Michael Albinus
2018-08-08 13:48               ` Michael Albinus
2018-08-08 14:35                 ` Eli Zaretskii
2018-08-08 14:42                   ` Eli Zaretskii
2018-08-08 18:06                     ` Michael Albinus
2018-08-09 12:24                       ` Michael Albinus
2018-08-09 15:18                         ` Eli Zaretskii
2018-08-10  7:27                           ` Michael Albinus
2018-08-08 15:26                   ` Michael Albinus
2018-08-08 15:57                     ` Eli Zaretskii
2018-07-31  4:58         ` Michael Albinus
2018-07-29 17:26   ` Eli Zaretskii
2018-07-30  8:26     ` Michael Albinus
2018-07-31 14:46   ` Andy Moreton
2018-07-31 20:57     ` Michael Albinus
2018-07-31 22:07       ` Ken Brown
2018-08-01 20:51         ` Michael Albinus

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=874lghdmvx.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=32304@debbugs.gnu.org \
    --cc=kbrown@cornell.edu \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).