From 00e4ac727c77d697daf4ab2c84628bdab2eb63ac Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 14 Aug 2010 06:54:49 +0000 Subject: [PATCH] add usb: filter as safety git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13245 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2/gphoto2-camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c index 20ce8e065..fba7d48e9 100644 --- a/libgphoto2/gphoto2-camera.c +++ b/libgphoto2/gphoto2-camera.c @@ -762,8 +762,8 @@ gp_camera_init (Camera *camera, GPContext *context) gp_port_get_info (camera->port, &info); gp_port_info_get_path (info, &ppath); gp_port_info_get_type (info, &ptype); - /* if the port was set before, then use that entry */ - if ((ptype == GP_PORT_USB) && strlen(ppath)) { + /* if the port was set before, then use that entry, but not if it is "usb:" */ + if ((ptype == GP_PORT_USB) && strlen(ppath) && strcmp(ppath, "usb:")) { for (p = gp_list_count (list);p--;) { const char *xp;