send file returns file size instead of true value
authorDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Thu, 22 Dec 2011 14:53:46 +0000 (15:53 +0100)
committerDobrica Pavlinusic <dpavlin@rsync1.maxxo.com>
Thu, 22 Dec 2011 14:53:46 +0000 (15:53 +0100)
lib/CloudStore/API.pm

index b686017..6ff2866 100644 (file)
@@ -186,6 +186,8 @@ sub send_file {
        my $ok = link $f_full, $t_full; 
        $self->append( $t, 'recv', -s $t_full, $f->{uid}, $t_path );
 
+       $ok = -s $t_full if $ok; # replace true with file size
+
        my $md5;
        if ( $f->{uid} == $self->{md5}->{uid} ) {
                $md5 = $f_path; # we don't have local md5sum db for md5 user!