* library.c: allow downloading thumbnail of nonimage objects,

however only in case that the ThumbCompressedSize is greater than 0


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6686 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Mariusz Woloszyn
2003-08-29 08:27:28 +00:00
parent 3b60ead2fa
commit d495ffb90f
2 changed files with 5 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2003-08-29 Mariusz Woloszyn
* library.c: allow downloading thumbnail of nonimage objects,
however only in case that the ThumbCompressedSize is greater than 0
2003-08-28 Mariusz Woloszyn
* library.c: added Canon IXUS 400, thanks to Till Kamppeter
2003-08-28 Mariusz Woloszyn

View File

@@ -873,7 +873,8 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
case GP_FILE_TYPE_PREVIEW:
/* Don't allow to get thumb of nonimage objects! */
if ((oi->ObjectFormat & 0x0800) == 0) return (GP_ERROR_NOT_SUPPORTED);
// Redundant???
// if ((oi->ObjectFormat & 0x0800) == 0) return (GP_ERROR_NOT_SUPPORTED);
/* if no thumb, for some reason */
if((size=oi->ThumbCompressedSize)==0) return (GP_ERROR_NOT_SUPPORTED);
CPR (context, ptp_getthumb(&camera->pl->params,