From a566062722a194a7f528867b9a8211a3337d0aa7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 26 Feb 2018 16:23:21 +0100 Subject: [PATCH] Fix problem in tramp-handle-substitute-in-file-name * lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Concat "/" only for local file "~". --- lisp/net/tramp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 618d026abde..bae039dba13 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3564,7 +3564,7 @@ support symbolic links." (concat (file-remote-p filename) (substitute-in-file-name localname)))))) ;; "/m:h:~" does not work for completion. We use "/m:h:~/". - (if (string-match "~$" filename) + (if (string-match "^~$" localname) (concat filename "/") filename)))) -- 2.39.5