Only search in senseApiLibPath if it's actually set
This commit is contained in:
@@ -16,11 +16,16 @@ static std::optional<std::string> findLibraryPath(
|
|||||||
const std::string& libraryPath)
|
const std::string& libraryPath)
|
||||||
{
|
{
|
||||||
std::vector<std::string> searchPaths = {
|
std::vector<std::string> searchPaths = {
|
||||||
OptionParser::getOptions().senseApiLibPath,
|
|
||||||
fs::current_path().string(),
|
fs::current_path().string(),
|
||||||
fs::path("/proc/self/exe").parent_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)
|
for (const auto& path : searchPaths)
|
||||||
{
|
{
|
||||||
fs::path fullPath = fs::path(path) / libraryPath;
|
fs::path fullPath = fs::path(path) / libraryPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user