From b9f86dcc75ceb96c7eb1a97b093a201287c0cb4f Mon Sep 17 00:00:00 2001 From: Michal Simon Date: Thu, 6 Dec 2018 11:42:23 +0100 Subject: [PATCH] [XrdCl] TPC is only possible if both src/dst are remote. --- src/XrdCl/XrdClThirdPartyCopyJob.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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 //--------------------------------------------------------------------------