Added ability to rebuild the resource database from the project resources folder. Editor can detect if the resource database is corrupt on load and if so prompts the user to repair it.

This commit is contained in:
Aruki
2017-07-04 04:59:22 -06:00
parent 1f3df14b02
commit 9a52fe52d4
29 changed files with 425 additions and 93 deletions

View File

@@ -76,12 +76,8 @@ void ApplyGeneratedName(CResourceEntry *pEntry, const TString& rkDir, const TStr
if (pEntry->Directory() == pNewDir && pEntry->Name() == NewName) return;
// Perform the move
CVirtualDirectory *pOldDir = pEntry->Directory();
bool Success = pEntry->Move(pNewDir->FullPath(), NewName, true, true);
ASSERT(Success);
// If the old directory is now empty, delete it
pEntry->ResourceStore()->ConditionalDeleteDirectory(pOldDir);
}
void GenerateAssetNames(CGameProject *pProj)
@@ -657,6 +653,7 @@ void GenerateAssetNames(CGameProject *pProj)
}
#endif
Log::Write("*** Asset Name Generation FINISHED ***");
pStore->RootDirectory()->RemoveEmptySubdirectories();
pStore->ConditionalSaveStore();
Log::Write("*** Asset Name Generation FINISHED ***");
}