[fix] reject missing trusted device stores after initialization

This commit is contained in:
dijunkun committed 2026-11-13 10:32:51 +08:00
1 parent b3be25ad80
commit 9d61aacffe
3 files changed
+21 -3

No files matched your search

@@ -6,7 +6,8 @@
namespace crossdesk {
void GuiRuntime::InitializeTrustedDevices(const std::filesystem::path& directory) {
try {
trusted_devices_ = std::make_unique<TrustedDevices>(directory, cache_path_);
trusted_devices_ = std::make_unique<TrustedDevices>(
directory, cache_path_, config_center_ && config_center_->IsTrustedDevicesOnly());
} catch (const std::exception& error) {
LOG_ERROR("Cannot load trusted devices: {}", error.what());
// The independent persisted switch stays enabled on identity/store failure.