Re: Ftp fetch file names with spaces

Tobey Wheelock <[email protected]> Mon, 15 Aug 2005 13:24:24 -0400
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
On Mon, Aug 15, 2005 at 03:57:13PM +0100, Joe Orton wrote:
> Actaully I think this is a server bug


Hmmm, I apologize, I thought this was about blanks in file names, but
it's not, it's about initial blanks.

I tested the server and it does handle blanks in names OK.  And so does
the unpatched sitecopy 0.16.0, EXCEPT if the file name has an initial
space.  It turns out that the file in question is " chetamula
market.jpg", not "chetamula market.jpg".  When it parsed the listing,
sitecopy must have dropped the initial space.

This does work in an ftp client:
quote MDTM public_html/jupiter/archives/images/ chetamula market.jpg
213 20050815171848

(After I deleted the troublesome file, sitecopy was able to fetch the
site, which includes lots of other files with blanks in their names,
without trouble.)

Looking back at the log that I originally sent, the initial blank
is apparent in the listing but is gone in the MDTM request.

> LIST -la public_html/jupiter/archives/images/
< 150 Opening ASCII mode data connection for file list
ls: init, topdir: [public_html/jupiter/archives/images]
ls: [-rw-rw-rw-   1 ftp      ftp          6063 Apr  2  2004  chetamula market-thumb.jpg]
ls: file (666, 6063): [chetamula market-thumb.jpg]
ls: [-rw-rw-rw-   1 ftp      ftp         78091 Apr  2  2004  chetamula market.jpg]
ls: file (666, 78091): [chetamula market.jpg]
ls: [drwxr-xr-x   2 ftp      ftp          8192 Jan 21  2005 .]
ls: [drwxr-xr-x   9 ftp      ftp          4096 Dec 16  2004 ..]
ls: [-rw-r--r--   1 ftp      ftp        158574 Jan 24  2003 45th-parallel.jpg]
ls: file (644, 158574): [45th-parallel.jpg]

<snip>

File: public_html/jupiter/archives/images/45th-parallel.jpg
Getting modtime.
> MDTM public_html/jupiter/archives/images/45th-parallel.jpg
< 213 20030124215722
Parsing modtime: 213 20030124215722
Converted to: Fri Jan 24 21:57:22 2003
Got modtime.
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.
> QUIT
< 221 Goodbye.
_______________________________________________
sitecopy maillist  -  [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy