Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: str4d <thestr4d@gmail.com>
  • Loading branch information
2 people authored and daira committed Sep 4, 2020
1 parent 6a7cfde commit dc9c95b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,13 @@ bool CWallet::Verify()

if (walletFile != boost::filesystem::basename(walletFile) + boost::filesystem::extension(walletFile)) {
boost::filesystem::path path(walletFile);
if(path.is_absolute()) {
if (path.is_absolute()) {
if (!boost::filesystem::exists(path.parent_path())) {
return UIError(strprintf(_("Absolute path %s do not exist"), walletFile));
}
}
else {
} else {
boost::filesystem::path full_path = GetDataDir() / path;
if(!boost::filesystem::exists(full_path.parent_path())) {
if (!boost::filesystem::exists(full_path.parent_path())) {
return UIError(strprintf(_("Relative path %s do not exist"), walletFile));
}
}
Expand Down

0 comments on commit dc9c95b

Please sign in to comment.