qml: clarify onboarding storage options for existing datadir

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] · Clicking Custom after Default fails to restore the remembered directory

In pre-init onboarding, clicking Custom after Default's check finishes rejects the remembered non-default directory with “The directory has not been checked.” and disables Next until another selection.

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

Details and suggested fix

useDefaultDataDir() preserves the remembered custom path, but this handler calls validateCustomDataDir() before selecting it. The production validator only returns a cached preview result for the active m_data_dir; any other path receives the not-checked error. Consequently, selectCustomDataDir() never runs, no preview starts, and Default remains active. The same guard prevents retrying an already-selected custom directory after a failed preview. Users can recover by clicking Default again or selecting the directory through Choose location….

Follow the folder picker's acceptance path: clear validationError, call selectCustomDataDir(customDataDir) directly, handle a false return, and let onDataDirSelectionFinished report the asynchronous result. Add a regression using the production validation contract. The existing QML restoration test uses a mock that always validates successfully, and the C++ test calls selection directly, bypassing this guard.


Coverage details

Earlier concerns

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