Skip to content

Commit

Permalink
Merge pull request #19243 from jakesmith/HPCC-32896-ensure-toplevelke…
Browse files Browse the repository at this point in the history
…y-copied

HPCC-32896 Fix Roxie clone file TLK meta loss bug

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Oct 29, 2024
2 parents 1ceec04 + bb7b3b9 commit 3c64800
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions dali/dfu/dfuutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,18 @@ class CFileCloner
if (iskey&&!cluster2.isEmpty())
dstfdesc->addCluster(cluster2,grp2,spec2);

for (unsigned pn=0; pn<numParts; pn++) {
offset_t sz = srcfdesc->queryPart(pn)->queryProperties().getPropInt64("@size",-1);
for (unsigned pn=0; pn<numParts; pn++)
{
IPropertyTree &srcProps = srcfdesc->queryPart(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
Expand Down

0 comments on commit 3c64800

Please sign in to comment.