errors on ptp_canon_setobjectarchive are not fatal.

S5 reports invalid object handle
This commit is contained in:
Marcus Meissner
2015-08-20 08:48:50 +02:00
parent 41f9e57e89
commit 30bf43e086

View File

@@ -5836,8 +5836,10 @@ read_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
ptp_operation_issupported(params,PTP_OC_CANON_SetObjectArchive)
) {
/* seems just a byte (0x20 - new) */
C_PTP_REP (ptp_canon_setobjectarchive (params, oid, ob->canon_flags & ~0x20));
ob->canon_flags &= ~0x20;
/* can fail on some models, like S5. Ignore errors. */
ret = LOG_ON_PTP_E (ptp_canon_setobjectarchive (params, oid, ob->canon_flags & ~0x20));
if (ret == PTP_RC_OK)
ob->canon_flags &= ~0x20;
}
}
break;