mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
Merge pull request #12483 from Atlante45/feat/backups-integration
Remove deleted file from the _assetsOnDisk set
This commit is contained in:
commit
d69669512f
1 changed files with 6 additions and 1 deletions
|
@ -106,7 +106,12 @@ void AssetsBackupHandler::checkForAssetsToDelete() {
|
||||||
});
|
});
|
||||||
if (noCorruptedBackups) {
|
if (noCorruptedBackups) {
|
||||||
for (const auto& hash : deprecatedAssets) {
|
for (const auto& hash : deprecatedAssets) {
|
||||||
QFile::remove(_assetsDirectory + hash);
|
auto success = QFile::remove(_assetsDirectory + hash);
|
||||||
|
if (success) {
|
||||||
|
_assetsOnDisk.erase(hash);
|
||||||
|
} else {
|
||||||
|
qCWarning(asset_backup) << "Could not delete asset:" << hash;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCWarning(asset_backup) << "Some backups did not load properly, aborting delete operation for safety.";
|
qCWarning(asset_backup) << "Some backups did not load properly, aborting delete operation for safety.";
|
||||||
|
|
Loading…
Reference in a new issue