Commit e8bedf5a authored by Glenn Morris's avatar Glenn Morris
Browse files

* lisp/net/ange-ftp.el (ange-ftp-good-msgs, ange-ftp-get-pwd):

Handle "Remote Directory" response of some clients.

Fixes: debbugs:15058
parent 58c4682f
2013-08-16 Glenn Morris <rgm@gnu.org> 2013-08-16 Glenn Morris <rgm@gnu.org>
* net/ange-ftp.el (ange-ftp-good-msgs, ange-ftp-get-pwd):
Handle "Remote Directory" response of some clients. (Bug#15058)
* emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local): * emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local):
Tweak warning. (Bug#14926) Tweak warning. (Bug#14926)
......
;;; ange-ftp.el --- transparent FTP support for GNU Emacs ;;; ange-ftp.el --- transparent FTP support for GNU Emacs
;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, ;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, Inc.
;; Inc.
;; Author: Andy Norman (ange@hplb.hpl.hp.com) ;; Author: Andy Norman (ange@hplb.hpl.hp.com)
;; Maintainer: FSF ;; Maintainer: FSF
...@@ -700,7 +699,7 @@ parenthesized expressions in REGEXP for the components (in that order)." ...@@ -700,7 +699,7 @@ parenthesized expressions in REGEXP for the components (in that order)."
"Regular expression matching the start of a multiline FTP reply.") "Regular expression matching the start of a multiline FTP reply.")
(defvar ange-ftp-good-msgs (defvar ange-ftp-good-msgs
"^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark" "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark\\|^Remote directory:"
"Regular expression matching FTP \"success\" messages.") "Regular expression matching FTP \"success\" messages.")
;; CMS and the odd VMS machine say 200 Port rather than 200 PORT. ;; CMS and the odd VMS machine say 200 Port rather than 200 PORT.
...@@ -3021,6 +3020,9 @@ and LINE is the relevant success or fail line from the FTP-client." ...@@ -3021,6 +3020,9 @@ and LINE is the relevant success or fail line from the FTP-client."
(if (car result) (if (car result)
(save-match-data (save-match-data
(and (or (string-match "\"\\([^\"]*\\)\"" line) (and (or (string-match "\"\\([^\"]*\\)\"" line)
;; Some clients cache the value and return it in
;; this way without asking the server. (Bug#15058)
(string-match "^Remote directory: \\(.*\\)" line)
(string-match " \\([^ ]+\\) " line)) ; stone-age VMS servers! (string-match " \\([^ ]+\\) " line)) ; stone-age VMS servers!
(setq dir (match-string 1 line))))) (setq dir (match-string 1 line)))))
(cons dir line))) (cons dir line)))
......
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