Ver código fonte

Merge pull request #5786 from jakesmith/hpcc-11324

HPCC-11324 - Allow DFS to delete external file via logical ref.

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 anos atrás
pai
commit
744a68a58a
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      dali/base/dadfs.cpp

+ 3 - 2
dali/base/dadfs.cpp

@@ -1295,7 +1295,7 @@ public:
     void doDelete() // Throw on error!
     {
         const char *logicalname = lfn.get();
-        if (!checkLogicalName(lfn,user,true,true,true,"remove"))
+        if (!lfn.isExternal() && checkLogicalName(lfn,user,true,true,true,"remove"))
             ThrowStringException(-1, "Logical Name fails for removal on %s", lfn.get());
 
         // Transaction files have already been unlocked at this point, delete all remaining files
@@ -7880,7 +7880,8 @@ bool CDistributedFileDirectory::removeEntry(const char *name, IUserDescriptor *u
 {
     CDfsLogicalFileName logicalname;
     logicalname.set(name);
-    checkLogicalName(logicalname,user,true,true,false,"delete");
+    if (!logicalname.isExternal())
+        checkLogicalName(logicalname,user,true,true,false,"delete");
 
     // Create a local transaction that will be destroyed (MORE: make transaction compulsory)
     Linked<IDistributedFileTransactionExt> localtrans;