Re: Ftp fetch file names with spaces

Joe Orton <[email protected]> Sat, 13 Aug 2005 16:20:11 +0100
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
On Thu, Aug 11, 2005 at 09:56:18AM -0400, Tobey Wheelock wrote:
> File: public_html/jupiter/archives/images/chetamula market.jpg
> Getting modtime.
> > MDTM public_html/jupiter/archives/images/chetamula market.jpg
> < 550 public_html/jupiter/archives/images/chetamula: No such file or directory
> Didn't get modtime.

It's not really clear how to solve this in FTP.

Does this patch make a difference?

Index: src/ftp.c
===================================================================
--- src/ftp.c	(revision 661)
+++ src/ftp.c	(working copy)
@@ -1150,7 +1150,7 @@
 get_modtime(ftp_session *sess, const char *root, const char *filename) 
 {
     NE_DEBUG(DEBUG_FTP, "Getting modtime.\n");
-    if (execute(sess, "MDTM %s%s", root, filename) == FTP_MODTIME) {
+    if (execute(sess, "MDTM \"%s%s\"", root, filename) == FTP_MODTIME) {
 	NE_DEBUG(DEBUG_FTP, "Got modtime.\n");
 	return FTP_OK;
     } else {

_______________________________________________
sitecopy maillist  -  [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy