mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
fix
This commit is contained in:
@@ -108,11 +108,6 @@ bool CFilesystemLoader::createResource(const std::string & requestedFilename, bo
|
||||
return true;
|
||||
}
|
||||
|
||||
void CFilesystemLoader::removeResource(const ResourcePath & resourceName)
|
||||
{
|
||||
fileList.erase(resourceName);
|
||||
}
|
||||
|
||||
std::unordered_map<ResourcePath, boost::filesystem::path> CFilesystemLoader::listFiles(const std::string &mountPoint, size_t depth, bool initial) const
|
||||
{
|
||||
static const EResType initArray[] = {
|
||||
|
||||
@@ -38,7 +38,6 @@ public:
|
||||
bool existsResource(const ResourcePath & resourceName) const override;
|
||||
std::string getMountPoint() const override;
|
||||
bool createResource(const std::string & filename, bool update = false) override;
|
||||
void removeResource(const ResourcePath & resourceName) override;
|
||||
std::optional<boost::filesystem::path> getResourceName(const ResourcePath & resourceName) const override;
|
||||
void updateFilteredFiles(std::function<bool(const std::string &)> filter) const override;
|
||||
std::unordered_set<ResourcePath> getFilteredFiles(std::function<bool(const ResourcePath &)> filter) const override;
|
||||
|
||||
@@ -182,6 +182,9 @@ void CResourceHandler::initialize()
|
||||
knownLoaders["root"] = globalResourceHandler.rootLoader.get();
|
||||
knownLoaders["saves"] = new CFilesystemLoader("SAVES/", VCMIDirs::get().userSavePath());
|
||||
knownLoaders["config"] = new CFilesystemLoader("CONFIG/", VCMIDirs::get().userConfigPath());
|
||||
|
||||
if(boost::filesystem::is_directory(VCMIDirs::get().userDataPath() / "Generated"))
|
||||
boost::filesystem::remove_all(VCMIDirs::get().userDataPath() / "Generated");
|
||||
knownLoaders["gen_data"] = new CFilesystemLoader("DATA/", VCMIDirs::get().userDataPath() / "Generated" / "Data");
|
||||
knownLoaders["gen_sprites"] = new CFilesystemLoader("SPRITES/", VCMIDirs::get().userDataPath() / "Generated" / "Sprites");
|
||||
|
||||
|
||||
@@ -95,11 +95,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove resources from cached list.
|
||||
*/
|
||||
virtual void removeResource(const ResourcePath & resourceName) { };
|
||||
|
||||
/**
|
||||
* @brief Returns all loaders that have resource with such name
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user