summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2013-01-20 17:25:48 +0000
committerMarcus Meissner <marcus@jet.franken.de>2013-01-20 17:25:48 +0000
commit6e8021a04d1fb9a6e9b024196a8d6e37ba3cd8db (patch)
treebf241e135d211f93cee6d511bc52d03e51161e66
parent34b1c19ffb694eccea4ef58f1acee59aa32e47ef (diff)
downloadlibgphoto2-6e8021a04d1fb9a6e9b024196a8d6e37ba3cd8db.tar.gz
read the canon special flags again to detect "new" files.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14187 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/ptp.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c
index c856b6ceb..b1826a943 100644
--- a/camlibs/ptp2/ptp.c
+++ b/camlibs/ptp2/ptp.c
@@ -5550,9 +5550,23 @@ ptp_object_want (PTPParams *params, uint32_t handle, int want, PTPObject **retob
/* Second EOS issue, 0x20000000 has 0x20000000 as parent */
if (ob->oi.ParentObject == handle)
ob->oi.ParentObject = 0;
- ob->flags |= X;
- /* EOS bug, DCIM links back to itself. */
+ /* Read out the canon special flags */
+ if ((params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) &&
+ ptp_operation_issupported(params,PTP_OC_CANON_GetObjectInfoEx)) {
+ PTPCANONFolderEntry *ents = NULL;
+ uint32_t numents = 0;
+
+ ret = ptp_canon_getobjectinfo(params,
+ ob->oi.StorageID,0,
+ ob->oi.ParentObject,handle,
+ &ents,&numents
+ );
+ if ((ret == PTP_RC_OK) && (numents >= 1))
+ ob->canon_flags = ents[0].Flags;
+ }
+
+ ob->flags |= X;
}
#undef X
if ( (want & PTPOBJECT_MTPPROPLIST_LOADED) &&