Only search in senseApiLibPath if it's actually set

This commit is contained in:
2025-01-08 15:08:23 -04:00
parent 1178970728
commit 01ddb6d842
+6 -1
View File
@@ -16,11 +16,16 @@ static std::optional<std::string> findLibraryPath(
const std::string& libraryPath)
{
std::vector<std::string> searchPaths = {
OptionParser::getOptions().senseApiLibPath,
fs::current_path().string(),
fs::path("/proc/self/exe").parent_path().string()
};
if (!OptionParser::getOptions().senseApiLibPath.empty())
{
searchPaths.insert(
searchPaths.begin(), OptionParser::getOptions().senseApiLibPath);
}
for (const auto& path : searchPaths)
{
fs::path fullPath = fs::path(path) / libraryPath;