changeset 19812:d59c3d1d7f0a

(insert-directory): Encode the file name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 08 Sep 1997 09:56:52 +0000
parents 66b7051ac215
children 48114d461ac4
files lisp/files.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon Sep 08 07:23:23 1997 +0000
+++ b/lisp/files.el	Mon Sep 08 09:56:52 1997 +0000
@@ -2985,14 +2985,16 @@
 				     (substring pattern (match-beginning 0)))
 			     beg (1+ (match-end 0))))
 		     (call-process shell-file-name nil t nil
-				   "-c" (concat "\\"  ;; Disregard shell aliases!
+				   "-c" (concat "\\" ;; Disregard shell aliases!
 						insert-directory-program
 						" -d "
 						(if (stringp switches)
 						    switches
 						  (mapconcat 'identity switches " "))
 						" -- "
-						pattern)))
+						(encode-coding-string
+						 pattern
+						 file-name-coding-system t))))
 		 ;; SunOS 4.1.3, SVr4 and others need the "." to list the
 		 ;; directory if FILE is a symbolic link.
 		 (apply 'call-process
@@ -3013,9 +3015,11 @@
 				  ;; Avoid lossage if FILE starts with `-'.
 				  '("--")
 				  (list
-				   (if full-directory-p
-				       (concat (file-name-as-directory file) ".")
-				     file)))))))
+				   (encode-coding-string
+				    (if full-directory-p
+					(concat (file-name-as-directory file) ".")
+				      file)
+				    file-name-coding-system t)))))))
 	    ;; We get here if ls failed.
 	    ;; Access the file to get a suitable error.
 	    (access-file file "Reading directory"))))))