From: Andrea V. <and...@un...> - 2018-05-22 11:12:35
|
Hi Phil, Il giorno sab, 19/05/2018 alle 09.27 -0700, Philip Langdale ha scritto: > Well, this continues to be confusing, but at least this demonstrates > there must be some way to make it work. > > At this point, I'd start with establishing what the error code is. > Due > to how the errorstack thing works in libmtp, we lose error codes > when > they propagated up through gvfs. I'd suggest you print the error > code > into the error message when getobjecthandles fails, or something > similar. If we're lucky, the code will tell us something useful (and > if > we're unlucky, we'll get GeneralError back..) > > The codes are described in src/ptp.h > If I have operated correctly I obtain a 0x02FF (PTP_ERROR_IO) [decimal 767], but be aware I am not a C programmer so please review my code: I changed add_ptp_error_to_errorstack(device, ret, "LIBMTP_Get_Files_And_Folders(): could not get object handles."); into char stError[255]="LIBMTP_Get_Files_And_Folders(): could not get object handles. ERROR CODE="; char stRet[12]=""; sprintf(stRet, "%#010x\n", ret); strcat (stError,stRet); add_ptp_error_to_errorstack(device, ret, stError); Is it correct? Thanks, Andrea |