mirror of
https://github.com/Vita3K/Vita3K.git
synced 2026-07-11 01:34:23 +02:00
app: Make linux also check for lowercase paths (#3979)
This commit is contained in:
committed by
GitHub
parent
5178faedce
commit
699c00fe96
@@ -349,11 +349,21 @@ void init_paths(Root &root_paths) {
|
||||
root_paths.set_log_path(fs::path(home_path) / ".cache" / app_name / "");
|
||||
}
|
||||
|
||||
// Static assets sorted by least to most priority, so that higher priority ones can override lower priority ones.
|
||||
if (fs::exists("/usr/share/Vita3K")) {
|
||||
root_paths.set_static_assets_path("/usr/share/Vita3K");
|
||||
} else if (fs::exists("/usr/local/share/Vita3K")) {
|
||||
root_paths.set_static_assets_path("/usr/local/share/Vita3K");
|
||||
const constexpr char *static_asset_paths[] = {
|
||||
"/usr/local/share/Vita3K",
|
||||
"/usr/share/Vita3K",
|
||||
};
|
||||
|
||||
// Check both normal case and all lowercase paths
|
||||
for (const auto &path : static_asset_paths) {
|
||||
if (fs::exists(path)) {
|
||||
root_paths.set_static_assets_path(path);
|
||||
break;
|
||||
}
|
||||
if (fs::exists(string_utils::tolower(path))) {
|
||||
root_paths.set_static_assets_path(string_utils::tolower(path));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Only really used in standalone (rare) or development
|
||||
|
||||
Reference in New Issue
Block a user