From 68cbb6517b376cc2d30c5c8a21bf9dec37d6a9e6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 22 Jul 2014 21:40:07 +0000 Subject: [PATCH] From: Axel Waggershauser do not report progress on unknown sized files (larger than 4GB) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15108 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/ptp2/usb.c b/camlibs/ptp2/usb.c index ed3db82ba..fec080056 100644 --- a/camlibs/ptp2/usb.c +++ b/camlibs/ptp2/usb.c @@ -334,7 +334,7 @@ ptp_usb_getdata (PTPParams* params, PTPContainer* ptp, PTPDataHandler *handler) data = malloc(READLEN); if (!data) return PTP_RC_GeneralError; - report_progress = (bytes_to_read > 2*CONTEXT_BLOCK_SIZE); + report_progress = (bytes_to_read > 2*CONTEXT_BLOCK_SIZE) && (dtoh32(usbdata.length) != 0xffffffffU); if (report_progress) progress_id = gp_context_progress_start (context, (bytes_to_read/CONTEXT_BLOCK_SIZE), _("Downloading...")); while (bytes_to_read > 0) {