From 996db6fed36d04b2575cbb7ebf323ad48248b5ac Mon Sep 17 00:00:00 2001 From: Mariusz Woloszyn Date: Sat, 29 May 2004 12:13:15 +0000 Subject: [PATCH] * library.c: Fixed a small problem that caused objects of undefined type not beeing downloadable. Now they are downloadable if the Thumb type is known. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7209 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/ChangeLog | 5 +++++ camlibs/ptp2/library.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/camlibs/ptp2/ChangeLog b/camlibs/ptp2/ChangeLog index a940ec390..0f429c8d3 100644 --- a/camlibs/ptp2/ChangeLog +++ b/camlibs/ptp2/ChangeLog @@ -1,3 +1,8 @@ +2004-05-29 Mariusz Woloszyn + * library.c: Fixed a small problem that caused objects of undefined + type not beeing downloadable. Now they are downloadable if the Thumb + type is known. + 2004-05-24 Marcus Meissner * library.c: Added Canon PowerShot SD110. diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index ef6b27def..3afd175e3 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -1063,9 +1063,11 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, /* we do not allow downloading unknown type files as in most cases they are special file (like firmware or control) which sometimes _cannot_ be downloaded. doing so we avoid errors.*/ - if ((oi->ObjectFormat == PTP_OFC_Undefined) || - (oi->ObjectFormat == PTP_OFC_Association)) + if (oi->ObjectFormat == PTP_OFC_Association || + (oi->ObjectFormat == PTP_OFC_Undefined && + oi->ThumbFormat == PTP_OFC_Undefined)) return (GP_ERROR_NOT_SUPPORTED); + size=oi->ObjectCompressedSize; CPR (context, ptp_getobject(&camera->pl->params, camera->pl->params.handles.Handler[object_id],