Explicit full path for OpenComposite search
This commit is contained in:
@@ -48,12 +48,11 @@ std::filesystem::path active_runtime::manifest_path()
|
||||
|
||||
std::filesystem::path active_runtime::opencomposite_path()
|
||||
{
|
||||
std::filesystem::path OpenComposite = "OpenComposite";
|
||||
if (auto path = flatpak_key(flatpak::section::instance, "app-path"))
|
||||
return *path / OpenComposite;
|
||||
return std::filesystem::path(*path) / "OpenComposite";
|
||||
for (auto path: std::ranges::split_view(std::string_view(OPENCOMPOSITE_SEARCH_PATH), std::string_view(":")))
|
||||
{
|
||||
if (auto res = std::string_view(path) / OpenComposite; std::filesystem::exists(res))
|
||||
if (auto res = std::string_view(path); std::filesystem::exists(res))
|
||||
return res;
|
||||
}
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user