Skip to content

Commit

Permalink
[XrdCl] fix checksuming in xrdcp for localfiles.
Browse files Browse the repository at this point in the history
fixes #641
  • Loading branch information
simonmichal committed Jan 12, 2018
1 parent 4fcff38 commit ebdec39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/XrdCl/XrdClClassicCopyJob.cc
Expand Up @@ -559,6 +559,9 @@ namespace
if( !checkSum.empty() ) return XrdCl::XRootDStatus();
}

if( pUrl->IsLocalFile() )
return XrdCl::Utils::GetLocalCheckSum( checkSum, checkSumType, pUrl->GetPath() );

std::string dataServer; pFile->GetProperty( "DataServer", dataServer );
std::string lastUrl; pFile->GetProperty( "LastURL", lastUrl );
return XrdCl::Utils::GetRemoteCheckSum( checkSum, checkSumType,
Expand Down Expand Up @@ -1335,6 +1338,9 @@ namespace
virtual XrdCl::XRootDStatus GetCheckSum( std::string &checkSum,
std::string &checkSumType )
{
if( pUrl->IsLocalFile() )
return XrdCl::Utils::GetLocalCheckSum( checkSum, checkSumType, pUrl->GetPath() );

std::string dataServer; pFile->GetProperty( "DataServer", dataServer );
return XrdCl::Utils::GetRemoteCheckSum( checkSum, checkSumType,
dataServer, pUrl->GetPath() );
Expand Down

0 comments on commit ebdec39

Please sign in to comment.