浏览代码

HPCC-14975 Should not copy "Protected" metadata from source to new copy

Prevent to copy 'Protect' attribute to the target file.

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>
Attila Vamos 9 年之前
父节点
当前提交
024ef1ea0a
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      dali/ft/filecopy.cpp

+ 5 - 2
dali/ft/filecopy.cpp

@@ -3140,8 +3140,11 @@ void FileSprayer::updateTargetProperties()
 
             // and simple (top level) elements
             Owned<IPropertyTreeIterator> iter = srcAttr->getElements("*");
-            ForEach(*iter) {
-                curProps.addPropTree(iter->query().queryName(),createPTreeFromIPT(&iter->query()));
+            ForEach(*iter)
+            {
+                const char *aname = iter->query().queryName();
+                if (stricmp(aname, "Protect") != 0)
+                    curProps.addPropTree(aname, createPTreeFromIPT(&iter->query()));
             }
         }
     }