[tree] fix duplicated anchor in filename
This Pull request:
Changes or fixes:
Fixes https://its.cern.ch/jira/browse/ROOT-5002
Checklist:
- [x] tested changes locally
- [ ] updated the docs (if necessary)
Test Results
21 files 21 suites 3d 13h 31m 38s ⏱️ 3 691 tests 3 691 ✅ 0 💤 0 ❌ 75 903 runs 75 903 ✅ 0 💤 0 ❌
Results for commit 45b62ea3.
:recycle: This comment has been updated with latest results.
Apologies, I'm trying to understand better what this PR is solving. I can't see from the original issue or from the new reproducer what was the previously broken situation, e.g. what was the file name? In the original issue I read
The method TEntryList::GetEntryList called inside TChain::SetEntryList doesn't find any match between with the TChain
Does the match happen via the file name?
Hi, if I recall correctly, the problem was:
chain.Add("cernstaff.zip#cernstaff.root");
which later led to in TEntryList to:
filename = tree->GetTree()->GetCurrentFile()->GetName();
TUrl url(filename.Data(), true);
url copies the "hash part" as anchor as an internal variable of the class.
but then, we also call:
url.SetFile(filename);
where filename still contains the hash part.
so we ended up with
filename = url.GetUrl();
which appends the previous filename with the internal anchor, so we end up having two times the hash part.
so cernstaff.zip#filename.root#filename.root
Which means that then, the TEntryList does find the "filename-filename" file inside that zip container.
revamping this nice PR.
@vepadulano one Windows still failing but I guess it's unrelated.