diff --git a/src/Components/Modules/Download.cpp b/src/Components/Modules/Download.cpp index 6d66c7b7..4b70a727 100644 --- a/src/Components/Modules/Download.cpp +++ b/src/Components/Modules/Download.cpp @@ -466,16 +466,12 @@ namespace Components std::vector fileList; const auto path = (*Game::fs_basepath)->current.string / fsGame; - auto list = Utils::IO::ListFiles(path, false); + auto list = FileSystem::GetSysFileList(path.generic_string(), "iwd", false); list.emplace_back("mod.ff"); for (const auto& file : list) { auto filename = path / file; - if (filename.extension() != ".iwd"s) // We don't want to serve other files - { - continue; - } if (file.find("_svr_") != std::string::npos) // Files that are 'server only' are skipped { diff --git a/src/Utils/IO.hpp b/src/Utils/IO.hpp index ae68a5ce..c4e73825 100644 --- a/src/Utils/IO.hpp +++ b/src/Utils/IO.hpp @@ -9,7 +9,7 @@ namespace Utils::IO bool RemoveFile(const std::string& file); std::size_t FileSize(const std::string& file); bool CreateDir(const std::string& dir); - bool DirectoryExists(const std::filesystem::path& file); - bool DirectoryIsEmpty(const std::filesystem::path& file); + bool DirectoryExists(const std::filesystem::path& directory); + bool DirectoryIsEmpty(const std::filesystem::path& directory); std::vector ListFiles(const std::filesystem::path& directory, bool recursive = false); }