]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-get-filename): Don't call encode-coding-string if FILE is nil.
authorRichard M. Stallman <rms@gnu.org>
Wed, 3 Sep 1997 22:31:25 +0000 (22:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 3 Sep 1997 22:31:25 +0000 (22:31 +0000)
lisp/dired.el

index e3273f732f09b94c2ec7572dbf3cd32767131c96..f01349a361aadb8a67ca878f206501a8735f6562 100644 (file)
@@ -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)))))