Bugfix: Wallet: Soft-fail exceptions within ListWalletDir file checks
This commit is contained in:
1 parent
f5cdc290d5
commit
69f59af54d
1 file changed
+5
@@ -49,6 +49,7 @@ std::vector<fs::path> ListWalletDir()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// Get wallet path relative to walletdir by removing walletdir from the wallet path.
|
// 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.
|
// 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);
|
const fs::path path = it->path().string().substr(offset);
|
||||||
@@ -70,6 +71,10 @@ std::vector<fs::path> ListWalletDir()
|
|||||||
paths.emplace_back(path);
|
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;
|
return paths;
|
||||||
|
|||||||
Reference in new issue
Block a user