Skip to content

Commit

Permalink
core: Avoid TWinNTSystem::ExpandPathName suppressing real error.
Browse files Browse the repository at this point in the history
If TWinNTSystem::ExpandPathName is executed before gROOT is fully initialized,
error messages were hiddem (for example about missing pcms)
  • Loading branch information
pcanal committed Jan 28, 2025
1 parent 913c4f6 commit 592cd29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/winnt/src/TWinNTSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,12 @@ Bool_t TWinNTSystem::ExpandPathName(TString &patbuf0)
char *cmd = nullptr;
char *q;

// We do want the messages from the gROOT initialization
// So let's force it rather than having as a side effect of the
// TUrl construction.
if (!ROOT::Internal::gROOTLocal || !ROOT::Internal::gROOTLocal->Initialized())
(void)gROOT;

Int_t old_level = gErrorIgnoreLevel;
gErrorIgnoreLevel = kFatal; // Explicitly remove all messages
if (patbuf0.BeginsWith("\\")) {
Expand Down

0 comments on commit 592cd29

Please sign in to comment.