Review report

bitcoin-core/gui-qml: PR #1050

1 minor finding

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Findings

Link

[minor] · Custom cannot restore a remembered directory after Default

After selecting Default, clicking Custom rejects the remembered non-default directory before selecting it, leaving onboarding with an error and a disabled Next button.

Location: qml/components/StorageLocations.qml:86 (head).

Details and suggested fix

Start onboarding with a non-default -datadir, select Default, and let its preview finish. useDefaultDataDir() retains the remembered custom path, but the new Custom handler calls validateCustomDataDir() before selecting it. The production validator only returns a preview result for the active m_data_dir; the remembered path now differs, so it returns "The directory has not been checked.". Consequently, selectCustomDataDir() never runs, no preview starts, and validSelection disables Next. The same guard also prevents retrying a current custom directory whose preview failed. Users can recover by selecting Default again or using Choose location… to pick the folder, because picker acceptance selects directly. Follow that existing contract here: clear the local error, call selectCustomDataDir(customDataDir) directly, handle an immediate false return, and let onDataDirSelectionFinished report the asynchronous result. Add a regression using production validation semantics. The QML mock always returns validation success, while the C++ restoration test calls selection directly, so neither catches this handler failure.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.