mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 2c2150aa04 into merged_master (Bitcoin PR bitcoin/bitcoin#26828)
This commit is contained in:
commit
0d09cb2bda
1 changed files with 8 additions and 8 deletions
|
|
@ -5472,15 +5472,15 @@ static bool DeleteCoinsDBFromDisk(const fs::path db_path, bool is_snapshot)
|
|||
if (is_snapshot) {
|
||||
fs::path base_blockhash_path = db_path / node::SNAPSHOT_BLOCKHASH_FILENAME;
|
||||
|
||||
if (fs::exists(base_blockhash_path)) {
|
||||
bool removed = fs::remove(base_blockhash_path);
|
||||
if (!removed) {
|
||||
LogPrintf("[snapshot] failed to remove file %s\n",
|
||||
fs::PathToString(base_blockhash_path));
|
||||
try {
|
||||
bool existed = fs::remove(base_blockhash_path);
|
||||
if (!existed) {
|
||||
LogPrintf("[snapshot] snapshot chainstate dir being removed lacks %s file\n",
|
||||
fs::PathToString(node::SNAPSHOT_BLOCKHASH_FILENAME));
|
||||
}
|
||||
} else {
|
||||
LogPrintf("[snapshot] snapshot chainstate dir being removed lacks %s file\n",
|
||||
fs::PathToString(node::SNAPSHOT_BLOCKHASH_FILENAME));
|
||||
} catch (const fs::filesystem_error& e) {
|
||||
LogPrintf("[snapshot] failed to remove file %s: %s\n",
|
||||
fs::PathToString(base_blockhash_path), fsbridge::get_filesystem_error_message(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue