[Xfce4-commits] <midori:master> Check for folders other than LIBDIR in sokoke_find_lib_path
Christian Dywan
noreply at xfce.org
Wed Sep 14 02:46:04 CEST 2011
Updating branch refs/heads/master
to 18a0d1da035b40ce653739fe36df0542d49e5a01 (commit)
from c1321b007230c2b5661da1bcaa727630eb93ad41 (commit)
commit 18a0d1da035b40ce653739fe36df0542d49e5a01
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Mon Aug 29 19:13:24 2011 +0200
Check for folders other than LIBDIR in sokoke_find_lib_path
midori/sokoke.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/midori/sokoke.c b/midori/sokoke.c
index c71864c..c83e0cb 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -1732,9 +1732,23 @@ gchar* sokoke_find_lib_path (const gchar* folder)
if (g_access (lib_path, F_OK) == 0)
return lib_path;
#else
- gchar* lib_path = g_build_filename (LIBDIR, folder ? folder : "", NULL);
- if (g_access (lib_path, F_OK) == 0)
- return lib_path;
+ const gchar* lib_dirs[] =
+ {
+ LIBDIR,
+ "/usr/local/lib",
+ "/usr/lib",
+ NULL
+ };
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (lib_dirs); i++)
+ {
+ gchar* lib_path = g_build_filename (lib_dirs[i], folder ? folder : "", NULL);
+ if (g_access (lib_path, F_OK) == 0)
+ return lib_path;
+ else
+ g_free (lib_path);
+ }
#endif
return NULL;
More information about the Xfce4-commits
mailing list