Skip to content

Commit 45b62ea

Browse files
authored
[tree] cleaner solution
1 parent 9be9f6c commit 45b62ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tree/tree/src/TEntryList.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,11 +1313,11 @@ void TEntryList::SetTree(const TTree *tree)
13131313
filename = tree->GetTree()->GetCurrentFile()->GetName();
13141314
TUrl url(filename.Data(), true);
13151315
if (!strcmp(url.GetProtocol(), "file")){
1316+
filename = url.GetFile(); // Get the file part, excluding the anchor, then expand
13161317
gSystem->ExpandPathName(filename);
13171318
if (!gSystem->IsAbsoluteFileName(filename))
13181319
gSystem->PrependPathName(gSystem->pwd(), filename);
13191320
filename = gSystem->UnixPathName(filename);
1320-
url.SetAnchor(""); // Avoid potentially duplicated # when calling SetFile below
13211321
url.SetFile(filename);
13221322
}
13231323
filename = url.GetUrl();

0 commit comments

Comments
 (0)