# HG changeset patch # User root@py2.ccos.de # Date 1255811778 -7200 # Node ID d9a8e1938145060379a750db17cba6dc9fb4b04d # Parent f5d804981be8a00ef9a23b4a63bcc87d3c03c615 set binary mode for transfer diff -r f5d804981be8 -r d9a8e1938145 ftpipe --- a/ftpipe Sat Oct 17 22:36:10 2009 +0200 +++ b/ftpipe Sat Oct 17 22:36:18 2009 +0200 @@ -40,6 +40,7 @@ my $ftp = new FTP($ftp{host}, Debug => $opt_debug, Passive => 1); $ftp->login($ftp{user}, $ftp{pass}); + $ftp->binary; $ftp->cwd($ftp{dir}); given ($opt_cmd) { @@ -92,6 +93,12 @@ my $self = shift; $self->SUPER::get(@_) or die "Can't put: " . $self->message; } + + sub binary { + my $self = shift; + $self->SUPER::binary(@_) or die "Can't set binary mode: " . $self->message; + } + }