From: Axel Waggershauser <awagger@web.de>

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
This commit is contained in:
Marcus Meissner
2014-07-22 21:40:07 +00:00
parent 126b55c7b8
commit 68cbb6517b

View File

@@ -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) {