*** /usr/local/src/emacs/lisp/net/ange-ftp.el.~1~ Wed Feb 6 20:49:56 2008 --- /usr/local/src/emacs/lisp/net/ange-ftp.el Tue Feb 12 13:46:33 2008 *************** *** 1523,1541 **** (defun ange-ftp-quote-string (string) "Quote any characters in STRING that may confuse the ftp process." ! (apply 'concat ! (mapcar (lambda (char) ! ;; This is said to be wrong; ftp is said to ! ;; need quoting only for ", and that by doubling it. ! ;; But experiment says this kind of quoting is correct ! ;; when talking to ftp on GNU/Linux systems. ! (if (or (<= char ? ) ! (> char ?\~) ! (= char ?\") ! (= char ?\\)) ! (vector ?\\ char) ! (vector char))) ! string))) (defun ange-ftp-barf-if-not-directory (directory) (or (file-directory-p directory) --- 1523,1529 ---- (defun ange-ftp-quote-string (string) "Quote any characters in STRING that may confuse the ftp process." ! (when (stringp string) (shell-quote-argument string))) (defun ange-ftp-barf-if-not-directory (directory) (or (file-directory-p directory) *************** *** 3766,3772 **** (ange-ftp-send-cmd t-host t-user ! (list 'put (or temp2 filename) t-name) (or msg (if (and temp2 f-parsed) (format "Putting %s" newname) --- 3754,3760 ---- (ange-ftp-send-cmd t-host t-user ! (list 'put (or temp2 (ange-ftp-quote-string filename)) t-name) (or msg (if (and temp2 f-parsed) (format "Putting %s" newname)