summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2000-08-26 07:26:43 +0000
committerivan <ivan>2000-08-26 07:26:43 +0000
commit9e33526700e6ff5dfe9d9b6c8afe14d8b0fce40e (patch)
treee0a1c3ee0c70b0f95b1adb83966965075d05d953
parentd72ca1a8a0f612a09077266f510bc53642d1513a (diff)
ftp cannot put full pathnames, cd to dir instead
-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 {