summaryrefslogtreecommitdiff
path: root/digitiz-xfer
diff options
context:
space:
mode:
Diffstat (limited to 'digitiz-xfer')
-rwxr-xr-xdigitiz-xfer7
1 files changed, 6 insertions, 1 deletions
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 {