mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add pseudopack 'core'
This commit is contained in:
parent
1a50e69769
commit
e19ed3d239
5 changed files with 22 additions and 22 deletions
|
|
@ -218,10 +218,6 @@ std::string ResPaths::findRaw(const std::string& filename) const {
|
|||
return root.name + ":" + filename;
|
||||
}
|
||||
}
|
||||
auto resDir = mainRoot;
|
||||
if (fs::exists(resDir / std::filesystem::path(filename))) {
|
||||
return "core:" + filename;
|
||||
}
|
||||
throw std::runtime_error("could not to find file " + util::quote(filename));
|
||||
}
|
||||
|
||||
|
|
@ -236,14 +232,6 @@ std::vector<std::string> ResPaths::listdirRaw(const std::string& folderName) con
|
|||
entries.emplace_back(root.name + ":" + folderName + "/" + name);
|
||||
}
|
||||
}
|
||||
{
|
||||
auto folder = mainRoot / fs::u8path(folderName);
|
||||
if (!fs::is_directory(folder)) return entries;
|
||||
for (const auto& entry : fs::directory_iterator(folder)) {
|
||||
auto name = entry.path().filename().u8string();
|
||||
entries.emplace_back("core:" + folderName + "/" + name);
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
|
|
@ -259,13 +247,6 @@ std::vector<std::filesystem::path> ResPaths::listdir(
|
|||
entries.push_back(entry.path());
|
||||
}
|
||||
}
|
||||
{
|
||||
auto folder = mainRoot / fs::u8path(folderName);
|
||||
if (!fs::is_directory(folder)) return entries;
|
||||
for (const auto& entry : fs::directory_iterator(folder)) {
|
||||
entries.push_back(entry.path());
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue