Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks

pull/19502/head
Luke Dashjr 4 years ago
parent f5cdc290d5
commit 69f59af54d

@ -49,6 +49,7 @@ std::vector<fs::path> ListWalletDir()
continue;
}
try {
// Get wallet path relative to walletdir by removing walletdir from the wallet path.
// This can be replaced by boost::filesystem::lexically_relative once boost is bumped to 1.60.
const fs::path path = it->path().string().substr(offset);
@ -70,6 +71,10 @@ std::vector<fs::path> ListWalletDir()
paths.emplace_back(path);
}
}
} catch (const std::exception& e) {
LogPrintf("%s: Error scanning %s: %s\n", __func__, it->path().string(), e.what());
it.no_push();
}
}
return paths;

Loading…
Cancel
Save