Mercurial > emacs
changeset 43131:0c878a7e5de7
(dired-get-filename): Add /: when appropriate
to avoid taking a local name as remote.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 06 Feb 2002 15:30:40 +0000 |
parents | 97ca502aebf5 |
children | 0dd2ebecd217 |
files | lisp/dired.el |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Wed Feb 06 15:29:29 2002 +0000 +++ b/lisp/dired.el Wed Feb 06 15:30:40 2002 +0000 @@ -1425,14 +1425,25 @@ (not default-file-name-coding-system) (setq file (encode-coding-string file buffer-file-coding-system))) (cond + ((null file) + nil) ((eq localp 'verbatim) file) ((and (eq localp 'no-dir) already-absolute) (file-name-nondirectory file)) - ((or already-absolute (eq localp 'no-dir)) + (already-absolute + (if (find-file-name-handler file nil) + (concat "/:" file) + file)) + ((eq localp 'no-dir) file) + ((equal (dired-current-directory) "/") + (setq file (concat (dired-current-directory localp) file)) + (if (find-file-name-handler file nil) + (concat "/:" file) + file)) (t - (and file (concat (dired-current-directory localp) file)))))) + (concat (dired-current-directory localp) file))))) (defun dired-string-replace-match (regexp string newtext &optional literal global)