Mercurial > emacs
comparison lisp/ange-ftp.el @ 22642:f392093d562d
(ange-ftp-send-cmd): When listing a directory that
contains space(s), cd to the directory first to avoid problems
with (some) ftp servers.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 29 Jun 1998 17:29:15 +0000 |
parents | a9b9f92d0f4d |
children | 2311a799a981 |
comparison
equal
deleted
inserted
replaced
22641:1c5197790616 | 22642:f392093d562d |
---|---|
2242 ;; be happy.) | 2242 ;; be happy.) |
2243 (and (eq host-type 'unix) | 2243 (and (eq host-type 'unix) |
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 |
2250 cmd1 (format "\"%s %s\"" cmd3 cmd1)))) | 2258 cmd1 (format "\"%s %s\"" cmd3 cmd1)))) |
2251 | 2259 |