Skip to content

Commit

Permalink
[hadd] avoid large RAM in hadd with multiple subdirs
Browse files Browse the repository at this point in the history
Fixes #13531
  • Loading branch information
ferdymercury authored and pcanal committed Mar 28, 2024
1 parent 7a4b12f commit d8330ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions io/io/src/TFileMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@ Bool_t TFileMerger::MergeOne(TDirectory *target, TList *sourcelist, Int_t type,
// If this folder is a onlyListed object, merge everything inside.
if (onlyListed) type &= ~kOnlyListed;
status = MergeRecursive(newdir, sourcelist, type);
// Delete newdir directory after having written it (merged)
if (!(type&kIncremental)) delete newdir;
if (onlyListed) type |= kOnlyListed;
if (!status) return kFALSE;
} else if (!cl->IsTObject() && cl->GetMerge()) {
Expand Down

0 comments on commit d8330ab

Please sign in to comment.