diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2010-08-14 06:54:49 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2010-08-14 06:54:49 +0000 |
commit | 00e4ac727c77d697daf4ab2c84628bdab2eb63ac (patch) | |
tree | 82a9abbd9213b347c007cad5806556a087bc526e /libgphoto2 | |
parent | 3e07a8630ab66947d503a21add1280c63f3918c4 (diff) | |
download | libgphoto2-00e4ac727c77d697daf4ab2c84628bdab2eb63ac.tar.gz |
add usb: filter as safety
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13245 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2')
-rw-r--r-- | libgphoto2/gphoto2-camera.c | 4 |
1 files 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; |