diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 1cd361ab8..031ff8c9b 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -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;