From 34c846cad9d51a734574b98a7bcac6dbb4f84a77 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Mon, 15 Apr 2024 13:14:16 +0200 Subject: [PATCH] UI: Fix relocatable Linux builds using legacy portable build flag --- UI/platform-x11.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UI/platform-x11.cpp b/UI/platform-x11.cpp index 1794f2ff6..d977facbc 100644 --- a/UI/platform-x11.cpp +++ b/UI/platform-x11.cpp @@ -184,7 +184,7 @@ static inline bool check_path(const char *data, const char *path, return (access(output.c_str(), R_OK) == 0); } -#define INSTALL_DATA_PATH OBS_INSTALL_PREFIX OBS_DATA_PATH "/obs-studio/" +#define INSTALL_DATA_PATH OBS_INSTALL_PREFIX "/" OBS_DATA_PATH "/obs-studio/" bool GetDataFilePath(const char *data, string &output) { @@ -200,7 +200,10 @@ bool GetDataFilePath(const char *data, string &output) if (relative_data_path) { bool result = check_path(data, relative_data_path, output); bfree(relative_data_path); - return result; + + if (result) { + return true; + } } if (check_path(data, OBS_DATA_PATH "/obs-studio/", output))