Merge pull request #12483 from Atlante45/feat/backups-integration

Remove deleted file from the _assetsOnDisk set
This commit is contained in:
Stephen Birarda 2018-02-22 18:46:25 -07:00 committed by GitHub
commit d69669512f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,12 @@ void AssetsBackupHandler::checkForAssetsToDelete() {
});
if (noCorruptedBackups) {
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 {
qCWarning(asset_backup) << "Some backups did not load properly, aborting delete operation for safety.";