mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 00:43:45 +01:00
Allow .dylib plugins on Mac OS X
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
9d1b58a4d9
commit
0ed98dd959
@ -83,6 +83,22 @@ zathura_plugin_manager_add_dir(zathura_plugin_manager_t* plugin_manager, const c
|
||||
girara_list_append(plugin_manager->path, g_strdup(dir));
|
||||
}
|
||||
|
||||
static bool
|
||||
check_suffix(const char* path)
|
||||
{
|
||||
if (g_str_has_suffix(path, ".so") == TRUE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (g_str_has_suffix(path, ".dylib") == TRUE) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
|
||||
{
|
||||
@ -108,7 +124,7 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_str_has_suffix(path, ".so") == FALSE) {
|
||||
if (check_suffix(path) == false) {
|
||||
girara_debug("%s is not a plugin file. Skipping.", path);
|
||||
g_free(path);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user