Fix crash in Content Storage async job when someone is using file storage and access cannot be freed

This commit is contained in:
Wojtek Figat
2023-12-07 11:18:18 +01:00
parent d847dfda61
commit 3749b35aba
3 changed files with 20 additions and 6 deletions

View File

@@ -176,7 +176,12 @@ void CreateAssetContext::ApplyChanges()
auto storage = ContentStorageManager::TryGetStorage(TargetAssetPath);
if (storage && storage->IsLoaded())
{
storage->CloseFileHandles();
if (storage->CloseFileHandles())
{
LOG(Error, "Cannot close file access for '{}'", TargetAssetPath);
_applyChangesResult = CreateAssetResult::CannotSaveFile;
return;
}
}
// Move file