0 votes
by (120 points)
edited

Hi,

I'm using Ftp::GetFile() to download files off a remote FTP server. In most cases everything works fine.

However, if the file I'm downloading is currently in the process of being uploaded by another program (FileZilla in my case) then I get an exception thrown by Ftp::GetFile() telling me that the file can't be opened. This in itself isn't a problem as I can handle the exception and simply try again later.

But.....

It manages to kill the FileZilla upload and results in a corrupted/incomplete file ending up on the server.

Now I accept that this is really a problem with FileZilla, but bearing in mind how many people use it, is there a more defensive way that I can code to avoid this problem?

For example, I tried to find a way of establishing if the file in question was currently open - without much success.

Does anyone out there know of a reliable way of deciding when it's safe to call Ftp::GetFile()?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (58.9k points)
edited

Hi,

calling Ftp.GetFile should be reliable anytime, as the client only issues RETR command. From the principle of FTP procol download of a file by the client cannot have any effect on the server file. So it looks like something is wrong somewhere else than in the Rebex FTP client.

If you are going to talk to FileZilla support, you could produce a log of communication between Rebex FTP and the FTP server to provide evidence for them.

by (120 points)
edited

I re-installed my FTP client (FileZilla) and the problem went away. Something must have got messed up. Anyway, everything is now working as expected. Sorry for clogging the forum up.

by (58.9k points)
edited

No problem, thank you for letting us know that the problem is solved now!

...