Skip to content

Commit

Permalink
[XrdCl] xrdcp: pass authz token with stat preceding copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Oct 11, 2022
1 parent 31595a3 commit 3caf92e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/XrdCl/XrdClCopy.cc
Expand Up @@ -710,7 +710,7 @@ int main( int argc, char **argv )
URL target( dest );
FileSystem fs( target );
StatInfo *statInfo = 0;
XRootDStatus st = fs.Stat( target.GetPath(), statInfo );
XRootDStatus st = fs.Stat( target.GetPathWithParams(), statInfo );
if( st.IsOK() )
{
if( statInfo->TestFlags( StatInfo::IsDir ) )
Expand All @@ -723,6 +723,12 @@ int main( int argc, char **argv )
if( config.dstFile->Path[n-1] == '/' )
targetIsDir = true;
}
else if( st.errNo == kXR_NotAuthorized )
{
log->Error( AppMsg, "%s (destination)", st.ToString().c_str() );
std::cerr << st.ToStr() << std::endl;
return st.GetShellCode();
}

delete statInfo;
}
Expand Down

0 comments on commit 3caf92e

Please sign in to comment.