libobs: Use absolute path for install prefix module load

This commit is contained in:
Penwywern 2025-04-11 01:05:59 +02:00 committed by Ryan Foster
parent b8f7c77937
commit 63260148df

View File

@ -72,11 +72,13 @@ void add_default_module_paths(void)
if (module_bin_path && module_data_path) {
char *abs_module_bin_path = os_get_abs_path_ptr(module_bin_path);
char *abs_module_install_path = os_get_abs_path_ptr(OBS_INSTALL_PREFIX "/" OBS_PLUGIN_DESTINATION);
if (abs_module_bin_path &&
strcmp(abs_module_bin_path, OBS_INSTALL_PREFIX "/" OBS_PLUGIN_DESTINATION) != 0) {
if (abs_module_bin_path && abs_module_install_path &&
strcmp(abs_module_bin_path, abs_module_install_path) != 0) {
obs_add_module_path(module_bin_path, module_data_path);
}
bfree(abs_module_install_path);
bfree(abs_module_bin_path);
}