diff options
author | ilya-fedin <[email protected]> | 2022-05-14 00:55:17 +0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-05-13 13:55:17 -0700 |
commit | e0d26ba25ab84f5a04a6ad2ef497cd0e93684a40 (patch) | |
tree | 19e651bb502b06aadd51836ee65e80043e495a4a /core | |
parent | af8e756dcb65b5a1744037808d0cfd5d7e574d39 (diff) |
Search the installation data directory (#693)
That allows the logic to work on non-FHS distros like NixOS
Diffstat (limited to 'core')
-rw-r--r-- | core/helpers.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/helpers.cpp b/core/helpers.cpp index c7e45a8b..6d0863ca 100644 --- a/core/helpers.cpp +++ b/core/helpers.cpp @@ -408,6 +408,20 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir) DirectorySearch(path.c_str(), ext, &results); } +#ifdef ALSOFT_INSTALL_DATADIR + // Search the installation data directory + { + std::string path{ALSOFT_INSTALL_DATADIR}; + if(!path.empty()) + { + if(path.back() != '/') + path += '/'; + path += subdir; + DirectorySearch(path.c_str(), ext, &results); + } + } +#endif + return results; } |