From b607792afe77db073a0d6fae626bd2ac2fa47b4b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 9 Apr 2014 07:07:31 +0000 Subject: [PATCH] again retrieve rootfolder, but avoid Sonys git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14886 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/library.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index d2f65dc93..62ba392f4 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -7179,9 +7179,12 @@ camera_init (Camera *camera, GPContext *context) ptp_getfilesystemmanifest (params, 0x00010001, 0, 0, &data); } #endif - /* hmm ... - ptp_list_folder (params, PTP_HANDLER_SPECIAL, PTP_HANDLER_SPECIAL); - */ + + /* avoid doing this on the Sonys DSLRs in control mode, they hang. :( */ + + if (params->deviceinfo.VendorExtensionID != PTP_VENDOR_SONY) + ptp_list_folder (params, PTP_HANDLER_SPECIAL, PTP_HANDLER_SPECIAL); + /* read the root directory to avoid the "DCIM WRONG ROOT" bugs */ CR (gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera)); {