emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el,v


From: Michael Albinus
Subject: [Emacs-diffs] Changes to emacs/lisp/net/ange-ftp.el,v
Date: Wed, 13 Feb 2008 17:27:39 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       08/02/13 17:27:38

Index: ange-ftp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/ange-ftp.el,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- ange-ftp.el 6 Feb 2008 14:44:14 -0000       1.95
+++ ange-ftp.el 13 Feb 2008 17:27:38 -0000      1.96
@@ -1523,19 +1523,11 @@
 
 (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)))
+  ;; This is said to be wrong; ftp is said to need quoting only for ",
+  ;; and that by doubling it.  But experiment says UNIX-style kind of
+  ;; quoting is correct when talking to ftp on GNU/Linux systems, and
+  ;; W32-style kind of quoting on, yes, W32 systems.
+  (when (stringp string) (shell-quote-argument string)))
 
 (defun ange-ftp-barf-if-not-directory (directory)
   (or (file-directory-p directory)
@@ -3766,7 +3758,7 @@
            (ange-ftp-send-cmd
             t-host
             t-user
-            (list 'put (or temp2 filename) t-name)
+            (list 'put (or temp2 (ange-ftp-quote-string filename)) t-name)
             (or msg
                 (if (and temp2 f-parsed)
                     (format "Putting %s" newname)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]