add usb: filter as safety

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13245 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2010-08-14 06:54:49 +00:00
parent 3e07a8630a
commit 00e4ac727c

View File

@@ -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;