Skip Menu |

This queue is for tickets about the Net-FTP-Recursive CPAN distribution.

Report information
The Basics
Id: 7905
Status: resolved
Priority: 0/
Queue: Net-FTP-Recursive

People
Owner: texasjdl [...] yahoo.com
Requestors: rrindels [...] ampmed.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.9
Fixed in: 1.11



Subject: Recursive Sends unlink via RemoveLocalFile even on error.
Distribution Name: Net::FTP::Recursive-1.9 Environment: Linux 2.4.9-e.24smp Perl Version: 5.6.1 I can't easily duplicate this bug, because it requires a 425 error be sent from the server on a recursive rput. I would think that a 425 Error would be interpreted as a failure and the original file would not be unlinked. $ftp->rput( RemoveLocalFiles => 1); From Log Dump: Sending CPPS_U277_2004-10-05-00-03-19-740. Net::FTP::Recursive=GLOB(0x8a481dc)>>> PASV^M Net::FTP::Recursive=GLOB(0x8a481dc)<<< 227 Entering Passive Mode (64,14,94,46,15,164). Net::FTP::Recursive=GLOB(0x8a481dc)>>> STOR CPPS_U277_2004-10-05-00-03-19-740^M Net::FTP::Recursive=GLOB(0x8a481dc)<<< 150 Opening BINARY data connection for CPPS_U277_2004-10-05-00-03-19-740 Net::FTP::Recursive=GLOB(0x8a481dc)<<< 425 transfer canceled Removing 'CPPS_U277_2004-10-05-00-03-19-740' from the local system.
I'll take a look at what Net::FTP provides and see if there's a smarter way for the Recursive module to determine success or failure.
[JDLEE - Wed Oct 6 12:11:31 2004]: Show quoted text
> I'll take a look at what Net::FTP provides and see if there's a > smarter > way for the Recursive module to determine success or failure. >
Any update?
[guest - Thu Oct 21 17:21:06 2004]: Show quoted text
> [JDLEE - Wed Oct 6 12:11:31 2004]: >
> > I'll take a look at what Net::FTP provides and see if there's a > > smarter > > way for the Recursive module to determine success or failure. > >
> > > Any update?
Hi, sorry for the delay. I looked at the docs for Net::FTP, and unfortunately, the module doesn't actually provide any sort of error code. What it does is return undef on failure, and Net::FTP::Recursive already looks at that. What I'm planning on doing instead is actually looking at the file that gets returned and making sure that it's at least the same size. I haven't finished implementing this change yet, but I should be ready to release a new version shortly.
Ok, I've released a new version of the module that adds another option, CheckSizes, that in addition to the RemoveRemoteFiles option will check to make sure that the local and remote filesizes match. I didn't want to make this the default behavior, at least not yet, in case of any platform compatibility problems or any modified parse_line functions. Let me know what you think.
From: rrindels [...] ampmed.com
[JDLEE - Tue Oct 26 15:19:41 2004]: Show quoted text
> Ok, I've released a new version of the module that adds another
option, Show quoted text
> CheckSizes, that in addition to the RemoveRemoteFiles option will
check Show quoted text
> to make sure that the local and remote filesizes match. I didn't want > to make this the default behavior, at least not yet, in case of any > platform compatibility problems or any modified parse_line functions. > > Let me know what you think.
After downloading and checking out this version, you have a comment in your documentation. "This check will only be performed for regular files, not directories or symlinks. This is a new option as of v1.10, and it is currently only implemented for rget, not rput". in my original Bug Report I show it occuring on an rput? Is there a reason you choose only on the rget?
[guest - Wed Oct 27 16:33:22 2004]: Show quoted text
> After downloading and checking out this version, you have a comment in > your documentation. > > "This check will only be performed for regular files, not directories > or symlinks. This is a new option as of v1.10, and it is currently only > implemented for rget, not rput". > > in my original Bug Report I show it occuring on an rput? Is there a > reason you choose only on the rget?
Well, my original reason was invalidated by looking closer at the Net::FTP docs and finding the "size" method. I shall be uploading a new version shortly which does have the CheckSizes option in the rput method.