Hi all :))

    After asking in the wget list (with no success), and after having
a look at the sources (a *little* look), I think that this is a bug,
so I've decided to report here.
 
    Let's go to the matter: when I download, thru FTP, some
hierarchy, the spaces are translated as '%20'. Nothing wrong with
that, of course, it is a safe behaviour. In fact, when files with
spaces in their names are saved, the %20 is translated back to a real
space. But its not the case for directóries, that are created with
%20 treated as three characters, literally the sequence "%20". An
example, server side:

    A directory/With a file in it.txt

    while downloading we can see:

    A%20directory

    and

    With%20a%20file%20in%20it.txt

    and locally they are stored as:

    A%20directory/With a file in it.txt

    Moreover, if the entire file name is passed to wget in the URL,
the entire filename has the annoying '%20' instead of unquoted
spaces. It seems that only the part that wget 'discovers' when
crawling is unquoted.

    This looks like a bug for me... For the details, I'm using wget
version 1.8.2, and the only options passed are '-c', '-r' and '-nH'
(and, of course, the URL ;))), and obviously the wgetrc settings... I
don't think that any option is affecting this. The complete command
line is:

    $ wget -c -r -nH "ftp://user:[EMAIL PROTECTED]/A Directory/*"
 
    Any help? Is this a bug? If you want to test I can provide you
with a test account in the server that is causing the problem (I
don't know of any other site that has directories and filenames with
spaces or other quoteable chars), any output from 'wget -d', my
global wgetrc or any other thing you need.

    The bug seems to be in the handling of the struct url that is
passed to the ftp module. It seems that the unquoted members (dir and
file) are not used to form the filename that will be stored on disk
:??? Currently I have not much spare time to look for the bug, but if
I can test something you can count on it.

    Thanks a lot in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/

Reply via email to