diff options
-rw-r--r-- | src/libcamera/utils.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libcamera/utils.cpp b/src/libcamera/utils.cpp index a96ca7f4..fbadf350 100644 --- a/src/libcamera/utils.cpp +++ b/src/libcamera/utils.cpp @@ -386,7 +386,16 @@ std::string libcameraBuildPath() if (ret == 0) return std::string(); - return dirname(info.dli_fname) + "/../../"; + std::string path = dirname(info.dli_fname) + "/../../"; + + char *real = realpath(path.c_str(), nullptr); + if (!real) + return std::string(); + + path = real; + free(real); + + return path + "/"; } /** |