Commit ab85f1b1 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(insert-directory): Encode the file name.

parent 6cade423
......@@ -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!
" -d "
(if (stringp switches)
(mapconcat 'identity switches " "))
" -- "
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 `-'.
(if full-directory-p
(concat (file-name-as-directory file) ".")
(if full-directory-p
(concat (file-name-as-directory 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"))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment