Apply suggestions from code review

Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
Alfredo Garcia 2020-08-28 09:57:37 -03:00 committed by Daira Hopwood
parent 6a7cfdea54
commit dc9c95b705
1 changed files with 3 additions and 4 deletions

View File

@ -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));
}
}