diff --git a/src/XrdCl/XrdClThirdPartyCopyJob.cc b/src/XrdCl/XrdClThirdPartyCopyJob.cc index b916362aa96..2f69161023e 100644 --- a/src/XrdCl/XrdClThirdPartyCopyJob.cc +++ b/src/XrdCl/XrdClThirdPartyCopyJob.cc @@ -290,6 +290,12 @@ namespace XrdCl const URL &source = GetSource(); const URL &target = GetTarget(); + //-------------------------------------------------------------------------- + // We can only do a TPC if both source and destination are remote files + //-------------------------------------------------------------------------- + if( source.IsLocalFile() || target.IsLocalFile() ) + return XRootDStatus( stError, errNotSupported ); + //-------------------------------------------------------------------------- // Check the initial settings //--------------------------------------------------------------------------