Common/FileSearch: Refactor DoFileSearch
This commit is contained in:
1 parent
3221e982d3
commit
f2e1c71803
19 files changed
+87
-48
No files matched your search
@@ -32,7 +32,7 @@ bool Init()
|
||||
{
|
||||
packs.clear();
|
||||
const std::vector<std::string> pack_list =
|
||||
Common::DoFileSearch({File::GetUserPath(D_RESOURCEPACK_IDX)}, {".zip"});
|
||||
Common::DoFileSearch(File::GetUserPath(D_RESOURCEPACK_IDX), ".zip");
|
||||
|
||||
Common::IniFile file = GetPackConfig();
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ bool ResourcePack::Uninstall(const std::string& path)
|
||||
|
||||
while (dir.length() > (path + TEXTURE_PATH).length())
|
||||
{
|
||||
auto is_empty = Common::DoFileSearch({dir}).empty();
|
||||
const auto is_empty = Common::DoFileSearch(dir).empty();
|
||||
|
||||
if (is_empty)
|
||||
File::DeleteDir(dir);
|
||||
|
||||
Reference in new issue
Block a user