mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 02:34:56 +01:00
use girara_split_path_array and girara_list_merge
This commit is contained in:
parent
133b127319
commit
19c1b0195b
1 changed files with 6 additions and 10 deletions
16
zathura.c
16
zathura.c
|
@ -94,18 +94,14 @@ zathura_init(int argc, char* argv[])
|
|||
g_mkdir_with_parents(zathura->config.data_dir, 0771);
|
||||
|
||||
if (plugin_path) {
|
||||
gchar** paths = g_strsplit(plugin_path, ":", 0);
|
||||
for (unsigned int i = 0; paths[i] != '\0'; ++i) {
|
||||
girara_list_append(zathura->plugins.path, g_strdup(paths[i]));
|
||||
}
|
||||
g_strfreev(paths);
|
||||
girara_list_t* paths = girara_split_path_array(plugin_path);
|
||||
girara_list_merge(zathura->plugins.path, paths);
|
||||
girara_list_free(paths);
|
||||
} else {
|
||||
#ifdef ZATHURA_PLUGINDIR
|
||||
gchar** paths = g_strsplit(ZATHURA_PLUGINDIR, ":", 0);
|
||||
for (unsigned int i = 0; paths[i] != '\0'; ++i) {
|
||||
girara_list_append(zathura->plugins.path, g_strdup(paths[i]));
|
||||
}
|
||||
g_strfreev(paths);
|
||||
girara_list_t* paths = girara_split_path_array(ZATHURA_PLUGINDIR);
|
||||
girara_list_merge(zathura->plugins.path, paths);
|
||||
girara_list_free(paths);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue