1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix resource creation

This commit is contained in:
Ivan Savenko
2023-09-04 16:16:00 +03:00
parent 9cfcf5ea19
commit 6a260a60cf
10 changed files with 13 additions and 12 deletions

View File

@@ -68,9 +68,10 @@ std::unordered_set<ResourcePath> CFilesystemLoader::getFilteredFiles(std::functi
return foundID;
}
bool CFilesystemLoader::createResource(const ResourcePath & resID, bool update)
bool CFilesystemLoader::createResource(const std::string & requestedFilename, bool update)
{
std::string filename = resID.getOriginalName() + '.' + boost::to_lower_copy(EResTypeHelper::getEResTypeAsString(resID.getType()));
std::string filename = requestedFilename;
ResourcePath resID(filename);
if (fileList.find(resID) != fileList.end())
return true;