From 3bc856d28d9a71c6085d4f2f37c0ae650baf6830 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 31 Aug 2003 18:56:21 +0000 Subject: [PATCH] *.la or *.a - we cannot load these, so no error msg git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6691 67ed7778-7388-44ab-90cf-0a291f65f57c --- .../libgphoto2_port/gphoto2-port-info-list.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c index 03fcc6886..d559305a8 100644 --- a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c +++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c @@ -287,9 +287,19 @@ gp_port_info_list_load (GPPortInfoList *list) lh = GP_SYSTEM_DLOPEN (path); if (!lh) { - gp_log (GP_LOG_DEBUG, "gphoto2-port-core", - "'%s' is not a library (%s)", path, - GP_SYSTEM_DLERROR ()); + size_t len; + len = strlen(buf); + if ((len >= 3) && + (buf[len-1] == 'a') && + ((buf[len-2] == '.') || + ((buf[len-2] == 'l') && (buf[len-3] == '.')) + )) { + /* *.la or *.a - we cannot load these, so no error msg */ + } else { + gp_log (GP_LOG_DEBUG, "gphoto2-port-core", + "'%s' is not a library (%s)", path, + GP_SYSTEM_DLERROR ()); + } continue; }