duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] FTP backend, consecutive ls


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] FTP backend, consecutive ls
Date: Wed, 03 Oct 2007 07:32:18 -0500
User-agent: Thunderbird 1.5.0.13 (X11/20070824)

Olivier Croquette wrote:
> I have got an incomparability between ncftp and the ftp server of my
> provider.
> ncftp sends a "NLST -CF" command which is interpreted by the server as
> "list the file named -CF".
> I have contacted the ncftp developers, who suggest using the -x option
> of nclftpls.

We may want a patch just for this server.  Which one is it?

> Anyhow, I have introduced another work-around in duplicity, and while
> doing that, I have noticed that in
> ftpBackend.list(), 2 consecutive listings are requested from the server.
> 
> I don't understand why 2 ls are necessary.
> The reason given is "# try for a long listing to avoid connection reset"

For some reason most of the FTP servers do a connection reset when you
list a directory that is empty, even ncftp.  The workaround for the
connection reset is to ask for a long listing, in which case you get an
empty list.  If its not empty, just ask again for the short list.

> In my workaround, I just use the results of the long listing .
> Indeed I am using the following patch and I have had no problem so far.

Long listings on FTP servers vary, thus the necessity of the short list.

> This is more a call for comments as a request for inclusion by the way :)
> 
> NB: Writing this email, I see that my code has a problem when a file
> contains a space character, but the topic is still interesting.

That is another reason for the short listing.  No parsing needed.

FTP is one place where standards would be really handy.

...Ken


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]