From: Dobrica Pavlinusic Date: Mon, 12 Dec 2011 22:43:35 +0000 (+0100) Subject: md5 user uses filename X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=996e2a934cb9d07bfb09fa69654d6481f1e8a7e3;p=cloudstore.git md5 user uses filename --- diff --git a/lib/CloudStore/API.pm b/lib/CloudStore/API.pm index 57c504f..30b6ec7 100644 --- a/lib/CloudStore/API.pm +++ b/lib/CloudStore/API.pm @@ -181,7 +181,12 @@ sub send_file { my $ok = link $f_full, $t_full; $self->append( $t, 'recv', -s $t_full, $f->{uid}, $t_path ); - my $md5 = $self->md5sum($f)->get( $f_path ); + my $md5; + if ( $f->{uid} == $self->{md5}->{uid} ) { + $md5 = $f_path; # we don't have local md5sum db for md5 user! + } else { + $md5 = $self->md5sum($f)->get( $f_path ); + } if ( ! $md5 ) { warn "ERROR: no md5 for $f_path"; return $ok;