From: ivan Date: Sat, 26 Aug 2000 07:26:43 +0000 (+0000) Subject: ftp cannot put full pathnames, cd to dir instead X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=9e33526700e6ff5dfe9d9b6c8afe14d8b0fce40e;p=Digitiz.git ftp cannot put full pathnames, cd to dir instead --- diff --git a/digitiz-xfer b/digitiz-xfer index e5b79d3..3fb0caf 100755 --- a/digitiz-xfer +++ b/digitiz-xfer @@ -223,12 +223,17 @@ sub docopy { #copies a file to the remote host _logmsg("copying $source_directory/$file to ". "$destination_host:$dest_file with $protocol"); + #so close + if ( $protocol eq 'ftp' ) { #so close + $xfer->cwd(dirname($dest_file)); + $dest_file = basename($dest_file); + } $xfer->put("$source_directory/$file", $dest_file); my $localsize = -s "$source_directory/$file"; my $remotesize = $xfer->size($dest_file); - if ( $localsize == $remotesize ) { + if ( $localsize && ( $localsize == $remotesize ) ) { logsuccess($file); archive($file); } else {