From 2816a593c26eab74cd09e8168a84cb01144674be Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Mon, 28 Oct 2024 16:58:05 +0000 Subject: [PATCH] HPCC-32896 Fix Roxie clone file TLK meta loss bug Roxie's clone file code was not copying the kind attribute from the source file. This meant the meta info for the TLK part was lost. Signed-off-by: Jake Smith --- dali/dfu/dfuutil.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dali/dfu/dfuutil.cpp b/dali/dfu/dfuutil.cpp index 6f7bb178190..6cb0cd1ceee 100644 --- a/dali/dfu/dfuutil.cpp +++ b/dali/dfu/dfuutil.cpp @@ -530,13 +530,18 @@ class CFileCloner if (iskey&&!cluster2.isEmpty()) dstfdesc->addCluster(cluster2,grp2,spec2); - for (unsigned pn=0; pnqueryPart(pn)->queryProperties().getPropInt64("@size",-1); + for (unsigned pn=0; pnqueryPart(pn)->queryProperties(); + IPropertyTree &dstProps = dstfdesc->queryPart(pn)->queryProperties(); + offset_t sz = srcProps.getPropInt64("@size",-1); if (sz!=(offset_t)-1) - dstfdesc->queryPart(pn)->queryProperties().setPropInt64("@size",sz); + dstProps.setPropInt64("@size",sz); StringBuffer dates; - if (srcfdesc->queryPart(pn)->queryProperties().getProp("@modified",dates)) - dstfdesc->queryPart(pn)->queryProperties().setProp("@modified",dates.str()); + if (srcProps.getProp("@modified",dates)) + dstProps.setProp("@modified",dates.str()); + if (srcProps.hasProp("@kind")) + dstProps.setProp("@kind", srcProps.queryProp("@kind")); } if (!copyphysical) //cloneFrom tells roxie where to copy from.. it's unnecessary if we already did the copy