mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:30:05 +00:00
Fix unhandled exception when Windows API fails to delete cached countries DB.
This commit is contained in:
parent
a5df5a237e
commit
54941e028f
1 changed files with 8 additions and 1 deletions
|
|
@ -129,7 +129,14 @@ void Initialize()
|
|||
sqlite3_close(db);
|
||||
|
||||
// Remove temporary file
|
||||
std::filesystem::remove(countyDatabaseCache);
|
||||
std::error_code err;
|
||||
|
||||
if (!std::filesystem::remove(countyDatabaseCache, err)) {
|
||||
logger_->error(
|
||||
"Unable to remove cached copy of database, error code: {} error category: {}",
|
||||
err.value(),
|
||||
err.category().name());
|
||||
}
|
||||
|
||||
initialized_ = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue