diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-02-19 09:33:24 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-02-19 09:33:24 +0100 |
commit | 938426d1ca0930b859c3e37b26513f5d74761284 (patch) | |
tree | 01557be637cf1bdc70b1cec26c92d1d428f90b00 /lisp/net | |
parent | e420e9f032dc3d73f89dee569c54fcf98618a50c (diff) | |
download | emacs-938426d1ca0930b859c3e37b26513f5d74761284.tar.gz |
Fix bug#25788
* lisp/net/tramp.el (tramp-autoload-file-name-handler):
Do not load tramp.el just for "/". (Bug#25788)
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/tramp.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 2bd75ab83f1..b05d55f9e04 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2156,11 +2156,14 @@ Falls back to normal file name handler if no Tramp file name handler exists." ;;;###autoload (progn (defun tramp-autoload-file-name-handler (operation &rest args) "Load Tramp file name handler, and perform OPERATION." - ;; Avoid recursive loading of tramp.el. - (if (let ((default-directory temporary-file-directory)) - (and (null load-in-progress) (load "tramp" 'noerror 'nomessage))) + (if (and + ;; Do not load tramp.el just for "/". + (not (and (stringp (car args)) (string-equal (car args) "/"))) + ;; Avoid recursive loading of tramp.el. + (let ((default-directory temporary-file-directory)) + (and (null load-in-progress) (load "tramp" 'noerror 'nomessage)))) (apply operation args) - ;; tramp.el not available for loading, fall back. + ;; tramp.el not needed or not available for loading, fall back. (tramp-completion-run-real-handler operation args)))) ;; `tramp-autoload-file-name-handler' must be registered before |