diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2026-10-21 22:45:58 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2026-10-21 22:45:58 -0600 |
| commit | cee101499ba749b4d316e9a03208a9fd30fed185 (patch) | |
| tree | 024cd8b5264a42357c7f63cc00fce8482475b6ce /src | |
| parent | 4389fca665fa98e6018303705941da1c00c18747 (diff) | |
Use lexically_relative for the remaining asset path lookupsgamecube-input
Diffstat (limited to 'src')
| -rw-r--r-- | src/Companion.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index e17eb5e..457ea80 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -2805,9 +2805,9 @@ static bool IsAssetYaml(const std::string& path) { } fs::path Companion::GetYamlDirectory(const std::string& yamlPath, YAML::Node& root) const { - auto relPath = relative(fs::path(yamlPath), this->gAssetPath).replace_extension(""); + auto relPath = fs::path(yamlPath).lexically_relative(this->gAssetPath).replace_extension(""); if (StringHelper::StartsWith(relPath.string(), "../")) - relPath = relative(fs::path(yamlPath), this->gCommonAssetPath).replace_extension(""); + relPath = fs::path(yamlPath).lexically_relative(this->gCommonAssetPath).replace_extension(""); if (auto directory = root[":config"]["directory"]) { return directory.as<std::string>(); @@ -2978,7 +2978,7 @@ std::vector<std::string> Companion::Manifest(const fs::path& root, const std::ve std::vector<std::string> out; for (const auto& file : files) { YAML::Node yaml = YAML::LoadFile(file.string()); - fs::path directory = fs::relative(file, root).replace_extension(""); + fs::path directory = fs::path(file).lexically_relative(root).replace_extension(""); if (yaml[":config"] && yaml[":config"]["directory"]) { directory = yaml[":config"]["directory"].as<std::string>(); } |
