qt: Fix compatibility with `-debuglogfile` command-line option
What changed, and why it matters
This is a small bug fix in the Bitcoin Core graphical wallet. Previously, the menu option that opens the debug log always looked for a file literally named 'debug.log', even if the user had started Bitcoin with a custom debug log filename. The change makes the menu use the actual configured filename. It is a correctness/usability fix, not a security vulnerability.
No security action required. Treat as a normal compatibility fix. If reviewing, verify that LogInstance().m_file_path is always initialized before this GUI action is invoked.
Security signals we found
No security-relevant signals detected in the diff or commit message.
Change is a one-line path-source substitution for UI consistency.
Evidence from the diff
The commit changes openDebugLogfile() in src/qt/guiutil.cpp from constructing the path as gArgs.GetDataDirNet() / ‘debug.log’ to reading LogInstance().m_file_path. This aligns the GUI’s ‘Open debug log’ action with the -debuglogfile argument so it opens the real log file. There is no evidence in the diff or commit message of a security flaw, buffer overflow, path traversal, or unauthorized access.
Changed components
src/qt/guiutil.cppBitcoin Core Qt GUI debug-log menu actionInspect captured patch +1 / −1
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index adf54953..7bafb3db 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -435,7 +435,7 @@ void handleCloseWindowShortcut(QWidget* w)
void openDebugLogfile()
{
- fs::path pathDebug = gArgs.GetDataDirNet() / "debug.log";
+ fs::path pathDebug = LogInstance().m_file_path;
/* Open debug.log with the associated application */
if (fs::exists(pathDebug))
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.