summaryrefslogtreecommitdiff
path: root/lisp/dired.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-03 22:31:25 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-03 22:31:25 +0000
commit0c04d68a42a7ef688e19d6c533fd6379b8db837b (patch)
tree495315b28ef0b0b784202e71b324a79086a078f3 /lisp/dired.el
parent25424f4e44e23776f110a5fde0f2f12517ff945d (diff)
downloademacs-0c04d68a42a7ef688e19d6c533fd6379b8db837b.tar.gz
(dired-get-filename): Don't call encode-coding-string if FILE is nil.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r--lisp/dired.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index e3273f732f0..f01349a361a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1299,8 +1299,8 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on
"\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t)
file)
"\"")))))
- (if buffer-file-coding-system
- (setq file (encode-coding-string file buffer-file-coding-system)))
+ (and file buffer-file-coding-system
+ (setq file (encode-coding-string file buffer-file-coding-system)))
(if (eq localp 'no-dir)
file
(and file (concat (dired-current-directory localp) file)))))