#silly arg processing
my($att, @check);
- push @check, $att while ($att=shift @attributes) ne '-';
+ push @check, $att while @attributes && ($att=shift @attributes) ne '-';
my %check = @check;
my %reply = @attributes;
$rsync->exec( {
src => "$user\@$host:$users",
dest => $dest,
- } );
+ } ) or die "error downloading $user\@$host:$users : ". $rsync->err;
$dest;
}
$rsync->exec( {
src => "$dir/users",
dest => "$user\@$host:$users",
- } );
+ } ) or die "error uploading to $user\@$host:$users : ". $rsync->err;
flock(LOCK,LOCK_UN);
close LOCK;