diff options
| author | Michael Albinus | 2008-02-13 17:28:00 +0000 |
|---|---|---|
| committer | Michael Albinus | 2008-02-13 17:28:00 +0000 |
| commit | 1860f08d41492b7ce4fcf3cc61aaa263193f06cd (patch) | |
| tree | 244b253414e037b63a4fdddf100d66faeb55a548 | |
| parent | 02dfeba8a4ce93dadd7f5fa7f462fca12fdf28f8 (diff) | |
| download | emacs-1860f08d41492b7ce4fcf3cc61aaa263193f06cd.tar.gz emacs-1860f08d41492b7ce4fcf3cc61aaa263193f06cd.zip | |
* net/ange-ftp.el (ange-ftp-quote-string): Use
`shell-quote-argument'. This DTRT even on w32 machines.
(ange-ftp-cf1): Quote FILENAME.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 20 |
2 files changed, 12 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfd106aca27..d95e064f164 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-02-13 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/ange-ftp.el (ange-ftp-quote-string): Use | ||
| 4 | `shell-quote-argument'. This DTRT even on w32 machines. | ||
| 5 | (ange-ftp-cf1): Quote FILENAME. | ||
| 6 | |||
| 1 | 2008-02-13 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2008-02-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * smerge-mode.el (smerge-auto-combine-max-separation): New var. | 9 | * smerge-mode.el (smerge-auto-combine-max-separation): New var. |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index da62fc8bc74..aeb2a8dc0d5 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1523,19 +1523,11 @@ then kill the related ftp process." | |||
| 1523 | 1523 | ||
| 1524 | (defun ange-ftp-quote-string (string) | 1524 | (defun ange-ftp-quote-string (string) |
| 1525 | "Quote any characters in STRING that may confuse the ftp process." | 1525 | "Quote any characters in STRING that may confuse the ftp process." |
| 1526 | (apply 'concat | 1526 | ;; This is said to be wrong; ftp is said to need quoting only for ", |
| 1527 | (mapcar (lambda (char) | 1527 | ;; and that by doubling it. But experiment says UNIX-style kind of |
| 1528 | ;; This is said to be wrong; ftp is said to | 1528 | ;; quoting is correct when talking to ftp on GNU/Linux systems, and |
| 1529 | ;; need quoting only for ", and that by doubling it. | 1529 | ;; W32-style kind of quoting on, yes, W32 systems. |
| 1530 | ;; But experiment says this kind of quoting is correct | 1530 | (when (stringp string) (shell-quote-argument string))) |
| 1531 | ;; when talking to ftp on GNU/Linux systems. | ||
| 1532 | (if (or (<= char ? ) | ||
| 1533 | (> char ?\~) | ||
| 1534 | (= char ?\") | ||
| 1535 | (= char ?\\)) | ||
| 1536 | (vector ?\\ char) | ||
| 1537 | (vector char))) | ||
| 1538 | string))) | ||
| 1539 | 1531 | ||
| 1540 | (defun ange-ftp-barf-if-not-directory (directory) | 1532 | (defun ange-ftp-barf-if-not-directory (directory) |
| 1541 | (or (file-directory-p directory) | 1533 | (or (file-directory-p directory) |
| @@ -3766,7 +3758,7 @@ Value is (0 0) if the modification time cannot be determined." | |||
| 3766 | (ange-ftp-send-cmd | 3758 | (ange-ftp-send-cmd |
| 3767 | t-host | 3759 | t-host |
| 3768 | t-user | 3760 | t-user |
| 3769 | (list 'put (or temp2 filename) t-name) | 3761 | (list 'put (or temp2 (ange-ftp-quote-string filename)) t-name) |
| 3770 | (or msg | 3762 | (or msg |
| 3771 | (if (and temp2 f-parsed) | 3763 | (if (and temp2 f-parsed) |
| 3772 | (format "Putting %s" newname) | 3764 | (format "Putting %s" newname) |