[libgda/gtk3] Allow loading of SQLite DLL ending in .so*



commit dedf14925f9d4b4eef768c69d1bbbcd4e3614763
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Mar 11 19:26:18 2011 +0100

    Allow loading of SQLite DLL ending in .so*

 libgda/sqlite/gda-symbols-util.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libgda/sqlite/gda-symbols-util.c b/libgda/sqlite/gda-symbols-util.c
index 1350124..1de65df 100644
--- a/libgda/sqlite/gda-symbols-util.c
+++ b/libgda/sqlite/gda-symbols-util.c
@@ -47,9 +47,14 @@ find_sqlite_in_dir (const gchar *dir_name, const gchar *name_part)
 	}
 	
 	while ((name = g_dir_read_name (dir))) {
-		if (!g_str_has_suffix (name, "." G_MODULE_SUFFIX))
+		const gchar *ptr1, *ptr2;
+		ptr1 = g_strrstr (name, "." G_MODULE_SUFFIX);
+		if (! ptr1)
 			continue;
-		if (!g_strrstr (name, name_part))
+		ptr2 = g_strrstr (name, name_part);
+		if (!ptr2)
+			continue;
+		if (ptr1 < ptr2)
 			continue;
 		
 		gchar *path;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]