diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-06-26 16:26:02 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-06-26 16:26:02 +0200 |
commit | d4561201891a53b7536fae98862b04535a1489c4 (patch) | |
tree | 6b37633fb3d9051a281845ccc6b3b49fb2c6e425 /lisp | |
parent | 1ed811a9edeca03f719376e8001c73046be5b1a2 (diff) | |
download | emacs-d4561201891a53b7536fae98862b04535a1489c4.tar.gz emacs-d4561201891a53b7536fae98862b04535a1489c4.tar.bz2 emacs-d4561201891a53b7536fae98862b04535a1489c4.zip |
Fix Tramp bug#49229
* lisp/net/tramp.el (tramp-file-name-handler): Drop possible
volume letter when `expand-file-name' is called with a local
absolute file name as first argument. (Bug#49229)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/net/tramp.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 0f15e4a20b5..c3b088aebb7 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2610,7 +2610,14 @@ Fall back to normal file name handler if no Tramp file name handler exists." ;; When `tramp-mode' is not enabled, or the file name is quoted, ;; we don't do anything. - (tramp-run-real-handler operation args)))) + ;; When operation is `expand-file-name', and the first argument + ;; is a local absolute file name, we end also here. Handle the + ;; MS Windows case. + (funcall + (if (and (eq operation 'expand-file-name) + (not (string-match-p "\\`[[:alpha:]]:/" (car args)))) + #'tramp-drop-volume-letter #'identity) + (tramp-run-real-handler operation args))))) (defun tramp-completion-file-name-handler (operation &rest args) "Invoke Tramp file name completion handler for OPERATION and ARGS. |