# HG changeset patch # User Richard M. Stallman # Date 899141355 0 # Node ID f392093d562dd893a63013e4ca7759075edf3004 # Parent 1c5197790616af53dc904b09eb38401ac0d93dd7 (ange-ftp-send-cmd): When listing a directory that contains space(s), cd to the directory first to avoid problems with (some) ftp servers. diff -r 1c5197790616 -r f392093d562d lisp/ange-ftp.el --- a/lisp/ange-ftp.el Mon Jun 29 17:23:25 1998 +0000 +++ b/lisp/ange-ftp.el Mon Jun 29 17:29:15 1998 +0000 @@ -2244,6 +2244,14 @@ (string-match "/$" cmd1) (not (string-match "R" cmd3)) (setq cmd1 (concat cmd1 "."))) + + ;; If the dir name contains a space, some ftp servers will + ;; refuse to list it. We instead change directory to the + ;; directory in question and ls ".". + (when (string-match " " cmd1) + (ange-ftp-cd host user (nth 1 cmd)) + (setq cmd1 ".")) + ;; If the remote ls can take switches, put them in (or (memq host-type ange-ftp-dumb-host-types) (setq cmd0 'ls