summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-08 09:56:52 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-08 09:56:52 +0000
commit5253b437e615b275ebca1faf936e973948d042ef (patch)
tree2ab7ae8c37c375e1933a002db67f22305ae6d8e9
parent45fb87253de6caf45355f4edb6de697aeb79958a (diff)
downloademacs-5253b437e615b275ebca1faf936e973948d042ef.tar.gz
(insert-directory): Encode the file name.
-rw-r--r--lisp/files.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el
index f12606ece7c..0968d0fef48 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2985,14 +2985,16 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
(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 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
;; 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"))))))