Merge pull request #596 from Brentdevent/mods

Fix incorrect mod data in getInfo
This commit is contained in:
Maurice Heumann 2023-04-26 09:22:58 +02:00 committed by GitHub
commit 16d165b6f6

View File

@ -203,6 +203,11 @@ namespace workshop
std::string get_mod_resized_name(const std::string& dir_name) std::string get_mod_resized_name(const std::string& dir_name)
{ {
if (dir_name == "usermaps" || dir_name.empty())
{
return dir_name;
}
std::string result = dir_name; std::string result = dir_name;
for (unsigned int i = 0; i < *game::modsCount; ++i) for (unsigned int i = 0; i < *game::modsCount; ++i)
@ -246,7 +251,7 @@ namespace workshop
std::string get_mod_publisher_id(const std::string& dir_name) std::string get_mod_publisher_id(const std::string& dir_name)
{ {
if (dir_name == "usermaps") if (dir_name == "usermaps" || dir_name.empty())
{ {
return dir_name; return dir_name;
} }