mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/gnc-module/gnc-module.c
(gnc_module_system_setup_load_path): don't do anything when dir list is empty. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6097 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
56e1916523
commit
e74814c28a
@ -110,31 +110,35 @@ gnc_module_system_setup_load_path(void)
|
||||
{
|
||||
GList * dirs = gnc_module_system_search_dirs();
|
||||
GList * lp;
|
||||
char *envt = getenv("LD_LIBRARY_PATH");
|
||||
|
||||
if(envt)
|
||||
if(dirs)
|
||||
{
|
||||
envt = g_strdup(envt);
|
||||
}
|
||||
else
|
||||
{
|
||||
envt = g_strdup("");
|
||||
}
|
||||
|
||||
for(lp=dirs; lp; lp=lp->next)
|
||||
{
|
||||
char *tmp = g_strdup_printf("%s:%s", envt, (char *) lp->data);
|
||||
char *envt = getenv("LD_LIBRARY_PATH");
|
||||
|
||||
if(envt)
|
||||
{
|
||||
envt = g_strdup(envt);
|
||||
}
|
||||
else
|
||||
{
|
||||
envt = g_strdup("");
|
||||
}
|
||||
|
||||
for(lp=dirs; lp; lp=lp->next)
|
||||
{
|
||||
char *tmp = g_strdup_printf("%s:%s", envt, (char *) lp->data);
|
||||
g_free(envt);
|
||||
envt = tmp;
|
||||
g_free(lp->data);
|
||||
}
|
||||
g_list_free(dirs);
|
||||
|
||||
if(gnc_setenv("LD_LIBRARY_PATH", envt, 1) != 0)
|
||||
{
|
||||
g_warning ("gnc-module failed to set LD_LIBRARY_PATH");
|
||||
}
|
||||
g_free(envt);
|
||||
envt = tmp;
|
||||
g_free(lp->data);
|
||||
}
|
||||
g_list_free(dirs);
|
||||
|
||||
if(gnc_setenv("LD_LIBRARY_PATH", envt, 1) != 0)
|
||||
{
|
||||
g_warning ("gnc-module failed to set LD_LIBRARY_PATH");
|
||||
}
|
||||
g_free(envt);
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user