2328 |
;; We cd and then use `ls' with no directory argument. |
;; We cd and then use `ls' with no directory argument. |
2329 |
;; This works around a misfeature of some versions of netbsd ftpd. |
;; This works around a misfeature of some versions of netbsd ftpd. |
2330 |
(unless (equal cmd1 ".") |
(unless (equal cmd1 ".") |
2331 |
(setq result (ange-ftp-cd host user (nth 1 cmd) 'noerror))) |
(setq result (ange-ftp-cd host user |
2332 |
(setq cmd1 cmd3))) |
;; Make sure the target to which |
2333 |
|
;; `cd' is performed is a directory. |
2334 |
|
(file-name-directory (nth 1 cmd)) |
2335 |
|
'noerror))) |
2336 |
|
;; Concatenate the switches and the target to be used with `ls'. |
2337 |
|
(setq cmd1 (concat "\"" cmd3 " " cmd1 "\"")))) |
2338 |
|
|
2339 |
;; First argument is the remote name |
;; First argument is the remote name |
2340 |
((progn |
((progn |
3127 |
(rest (substring name (match-end 0))) |
(rest (substring name (match-end 0))) |
3128 |
(dir (ange-ftp-expand-dir host user tilda))) |
(dir (ange-ftp-expand-dir host user tilda))) |
3129 |
(if dir |
(if dir |
3130 |
(setq name (if (string-equal dir "/") |
(setq name (cond ((string-equal rest "") |
3131 |
rest (concat dir rest))) |
dir) |
3132 |
|
((string-equal dir "/") |
3133 |
|
rest) |
3134 |
|
(t |
3135 |
|
(concat dir rest)))) |
3136 |
(error "User \"%s\" is not known" |
(error "User \"%s\" is not known" |
3137 |
(substring tilda 1))))) |
(substring tilda 1))))) |
3138 |
|
|