summaryrefslogtreecommitdiff
path: root/libgphoto2/gphoto2-camera.c
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2010-08-14 06:54:49 +0000
committerMarcus Meissner <marcus@jet.franken.de>2010-08-14 06:54:49 +0000
commit00e4ac727c77d697daf4ab2c84628bdab2eb63ac (patch)
tree82a9abbd9213b347c007cad5806556a087bc526e /libgphoto2/gphoto2-camera.c
parent3e07a8630ab66947d503a21add1280c63f3918c4 (diff)
downloadlibgphoto2-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/gphoto2-camera.c')
-rw-r--r--libgphoto2/gphoto2-camera.c4
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;