- (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.
+ (if (stringp string)
+ (shell-quote-argument string)
+ ""))