mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 09:20:04 +00:00
Merge pull request #60 from jtleniger/fix-country-cache-permission-error
Fix unhandled exception when Windows API fails to delete cached counties DB
This commit is contained in:
commit
3885d0d650
1 changed files with 8 additions and 1 deletions
|
|
@ -129,7 +129,14 @@ void Initialize()
|
||||||
sqlite3_close(db);
|
sqlite3_close(db);
|
||||||
|
|
||||||
// Remove temporary file
|
// Remove temporary file
|
||||||
std::filesystem::remove(countyDatabaseCache);
|
std::error_code err;
|
||||||
|
|
||||||
|
if (!std::filesystem::remove(countyDatabaseCache, err)) {
|
||||||
|
logger_->warn(
|
||||||
|
"Unable to remove cached copy of database, error code: {} error category: {}",
|
||||||
|
err.value(),
|
||||||
|
err.category().name());
|
||||||
|
}
|
||||||
|
|
||||||
initialized_ = true;
|
initialized_ = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue