diff --git a/hcore/senseApis/senseApiManager.cpp b/hcore/senseApis/senseApiManager.cpp index b400b2c..061577b 100644 --- a/hcore/senseApis/senseApiManager.cpp +++ b/hcore/senseApis/senseApiManager.cpp @@ -16,11 +16,16 @@ static std::optional findLibraryPath( const std::string& libraryPath) { std::vector 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;