Commit 2b93080a authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(ange-ftp-file-size): Use unwind-protect.

parent 18b5ffb5
2009-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
* net/ange-ftp.el (ange-ftp-file-size): Use unwind-protect.
2009-10-18 Glenn Morris <rgm@gnu.org>
* Makefile.in (compile-last): Ensure GREP_OPTIONS is null before calling
......
......@@ -3570,10 +3570,11 @@ so return the size on the remote host exactly. See RFC 3659."
;; Transfer complete" before the "213 SIZE". Let's skip
;; that.
(ange-ftp-skip-msgs (concat ange-ftp-skip-msgs "\\|^226"))
(res (prog2
(unless ascii-mode
(ange-ftp-set-binary-mode host user))
(ange-ftp-send-cmd host user (list 'quote "size" name))
(res (unwind-protect
(progn
(unless ascii-mode
(ange-ftp-set-binary-mode host user))
(ange-ftp-send-cmd host user (list 'quote "size" name)))
(unless ascii-mode
(ange-ftp-set-ascii-mode host user))))
(line (cdr res)))
......
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