migrate from std::filesystem::path to io::path (WIP)

This commit is contained in:
MihailRis
2025-01-30 22:23:13 +03:00
parent 1e22882284
commit e0314803c0
72 changed files with 1189 additions and 791 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
PacksManager::PacksManager() = default;
void PacksManager::setSources(std::vector<std::pair<std::string, fs::path>> sources) {
void PacksManager::setSources(std::vector<std::pair<std::string, io::path>> sources) {
this->sources = std::move(sources);
}
@@ -42,7 +42,7 @@ std::vector<ContentPack> PacksManager::getAll(
for (auto& name : names) {
auto found = packs.find(name);
if (found == packs.end()) {
throw contentpack_error(name, fs::path(""), "pack not found");
throw contentpack_error(name, io::path(), "pack not found");
}
packsList.push_back(found->second);
}
@@ -92,7 +92,7 @@ static bool resolve_dependencies(
bool exists = found != packs.end();
if (!exists && dep.level == DependencyLevel::required) {
throw contentpack_error(
dep.id, fs::path(), "dependency of '" + pack->id + "'"
dep.id, io::path(), "dependency of '" + pack->id + "'"
);
}
if (!exists) {
@@ -127,7 +127,7 @@ std::vector<std::string> PacksManager::assemble(
for (auto& name : names) {
auto found = packs.find(name);
if (found == packs.end()) {
throw contentpack_error(name, fs::path(""), "pack not found");
throw contentpack_error(name, io::path(), "pack not found");
}
queue.push(&found->second);
}