aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-29 17:29:15 +0000
committerRichard M. Stallman1998-06-29 17:29:15 +0000
commit5bc3ed3e8f69f8e38b0d7c736b7eb290fcc0f6c8 (patch)
tree47b5529efd20294eaac4a695548e165fa6862805
parent2cd6a032aa501a3964be9d222e65bb44ba9960f7 (diff)
downloademacs-5bc3ed3e8f69f8e38b0d7c736b7eb290fcc0f6c8.tar.gz
emacs-5bc3ed3e8f69f8e38b0d7c736b7eb290fcc0f6c8.zip
(ange-ftp-send-cmd): When listing a directory that
contains space(s), cd to the directory first to avoid problems with (some) ftp servers.
-rw-r--r--lisp/ange-ftp.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index 6053d43a590..226ee04bb91 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -2244,6 +2244,14 @@ and NOWAIT."
2244 (string-match "/$" cmd1) 2244 (string-match "/$" cmd1)
2245 (not (string-match "R" cmd3)) 2245 (not (string-match "R" cmd3))
2246 (setq cmd1 (concat cmd1 "."))) 2246 (setq cmd1 (concat cmd1 ".")))
2247
2248 ;; If the dir name contains a space, some ftp servers will
2249 ;; refuse to list it. We instead change directory to the
2250 ;; directory in question and ls ".".
2251 (when (string-match " " cmd1)
2252 (ange-ftp-cd host user (nth 1 cmd))
2253 (setq cmd1 "."))
2254
2247 ;; If the remote ls can take switches, put them in 2255 ;; If the remote ls can take switches, put them in
2248 (or (memq host-type ange-ftp-dumb-host-types) 2256 (or (memq host-type ange-ftp-dumb-host-types)
2249 (setq cmd0 'ls 2257 (setq cmd0 'ls