Re: Ftp fetch file names with spaces
Tobey Wheelock <[email protected]> Mon, 15 Aug 2005 10:36:11 -0400
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Aug 13, 2005 at 04:20:11PM +0100, Joe Orton wrote:
> It's not really clear how to solve this in FTP.
>
> Does this patch make a difference?
>
> + if (execute(sess, "MDTM \"%s%s\"", root, filename) == FTP_MODTIME) {
Yes, it changes things, but not in a good way.
LIST -la public_html/
<snip>
ls: [-rw-r--r-- 1 ftp ftp 365 Mar 5 2004 venus]
ls: file (644, 365): [venus]
<snip>
File: public_html/venus
Getting modtime.
> MDTM "public_html/venus"
< 550 public_html/venus: No such file or directory
Didn't get modtime.
What's odd is that when I send that command via an ftp client, it works:
quote MDTM "public_html/venus"
213 20040305034502
However, it still doesn't work for files with spaces:
quote MDTM "public_html/jupiter/archives/images/chetamula market.jpg"
550 public_html/jupiter/archives/images/chetamula: No such file or directory
Backslashed is closer:
quote MDTM \"public_html/jupiter/archives/images/chetamula market.jpg\"
550 public_html/jupiter/archives/images/chetamula market.jpg: No such file or directory
_______________________________________________
sitecopy maillist - [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy