# HG changeset patch # User Richard M. Stallman # Date 1013009440 0 # Node ID 0c878a7e5de7ef87ffb48a1d4e934a26127daf91 # Parent 97ca502aebf5bd4842c7a1e3730f193abf45138a (dired-get-filename): Add /: when appropriate to avoid taking a local name as remote. diff -r 97ca502aebf5 -r 0c878a7e5de7 lisp/dired.el --- 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)