@@ -760,9 +760,14 @@ bool Content::CloneAssetFile(const StringView& dstPath, const StringView& srcPat
|
|||||||
// Change asset ID
|
// Change asset ID
|
||||||
{
|
{
|
||||||
auto storage = ContentStorageManager::GetStorage(tmpPath);
|
auto storage = ContentStorageManager::GetStorage(tmpPath);
|
||||||
|
if (!storage)
|
||||||
|
{
|
||||||
|
LOG(Warning, "Cannot change asset ID.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
FlaxStorage::Entry e;
|
FlaxStorage::Entry e;
|
||||||
storage->GetEntry(0, e);
|
storage->GetEntry(0, e);
|
||||||
if (!storage || storage->ChangeAssetID(e, dstId))
|
if (storage->ChangeAssetID(e, dstId))
|
||||||
{
|
{
|
||||||
LOG(Warning, "Cannot change asset ID.");
|
LOG(Warning, "Cannot change asset ID.");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -211,6 +211,12 @@ FlaxStorage::~FlaxStorage()
|
|||||||
CHECK(_chunksLock == 0);
|
CHECK(_chunksLock == 0);
|
||||||
CHECK(_refCount == 0);
|
CHECK(_refCount == 0);
|
||||||
ASSERT(_chunks.IsEmpty());
|
ASSERT(_chunks.IsEmpty());
|
||||||
|
|
||||||
|
#if USE_EDITOR
|
||||||
|
// Ensure to close any outstanding file handles to prevent file locking in case it failed to load
|
||||||
|
_file.DeleteAll();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FlaxStorage::LockData FlaxStorage::LockSafe()
|
FlaxStorage::LockData FlaxStorage::LockSafe()
|
||||||
|
|||||||
Reference in New Issue
Block a user