summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-07-28 18:51:16 -0600
committerGitHub <noreply@github.com>2024-07-28 18:51:16 -0600
commitaa02af7b7d82f261356c766af2e92a3f451e5f43 (patch)
tree0bd44720250e485e061c9f5dfc36d9210ba10f3e
parent5c7f8f8b27887fe4aeaa342f45593d39a88e6455 (diff)
Update Companion.cpp (#145)
-rw-r--r--src/Companion.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp
index a797ee4..2c2655b 100644
--- a/src/Companion.cpp
+++ b/src/Companion.cpp
@@ -477,10 +477,10 @@ void Companion::LoadYAMLRecursively(const std::string &dirPath, std::vector<YAML
}
// Recursive call for subdirectories
- LoadYAMLRecursively(entry.path().string(), result, false);
+ LoadYAMLRecursively(entry.path().generic_string(), result, false);
} else if (entry.path().extension() == ".yaml" || entry.path().extension() == ".yml") {
// Load YAML file and add it to the result vector
- result.push_back(YAML::LoadFile(entry.path().string()));
+ result.push_back(YAML::LoadFile(entry.path().generic_string()));
}
}
}
@@ -1141,7 +1141,7 @@ void Companion::Process() {
continue;
}
- const auto yamlPath = entry.path().string();
+ const auto yamlPath = entry.path().generic_string();
if(yamlPath.find(".yaml") == std::string::npos && yamlPath.find(".yml") == std::string::npos) {
continue;
@@ -1207,7 +1207,7 @@ void Companion::Pack(const std::string& folder, const std::string& output) {
std::ifstream input( entry.path(), std::ios::binary );
auto data = std::vector( std::istreambuf_iterator( input ), {} );
input.close();
- files[entry.path().string()] = data;
+ files[entry.path().generic_string()] = data;
}
auto wrapper = SWrapper(output);