Ver código fonte

HPCC-12326 Revise based on review comment

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 10 anos atrás
pai
commit
adbb273919
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      common/workunit/referencedfilelist.cpp

+ 3 - 3
common/workunit/referencedfilelist.cpp

@@ -533,8 +533,7 @@ void ReferencedFileList::ensureFile(const char *ln, unsigned flags, const char *
     else
     {
         const char *refln = file->getLogicalName();
-        //Cannot clear the ownership for the file because the setValue() does not take the ownership.
-        //See MappingStringToIInterface.
+        // NOTE: setValue links its parameter
         map.setValue(refln, file);
     }
 }
@@ -671,7 +670,8 @@ void ReferencedFileList::resolveSubFiles(StringArray &subfiles, bool checkLocalF
         {
             file->resolve(process.get(), srcCluster, user, remote, remotePrefix, checkLocalFirst, &childSubFiles, resolveForeign);
             const char *ln = file->getLogicalName();
-            map.setValue(ln, file.getClear());
+            // NOTE: setValue links its parameter
+            map.setValue(ln, file);
         }
     }
     if (childSubFiles.length())