Bug 340908 - kamera KIO Slave can't copy large files (>2GB)
Summary: kamera KIO Slave can't copy large files (>2GB)
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kamera (show other bugs)
Version: 4.13.3
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Marcus Meissner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 21:21 UTC by Alexander LAW
Modified: 2014-11-13 07:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
This patch removes 2 GB limit. (1.31 KB, patch)
2014-11-12 21:23 UTC, Alexander LAW
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander LAW 2014-11-12 21:21:07 UTC
kio_kamera (camera: protocol handler) crashes with error when copying large file (more than 2 GB).


Reproducible: Always

Steps to Reproduce:
1. Connect a camera with large files on it's memory card.
2. Try to copy one or more such large files on a local disk.
3. 

Actual Results:  
Error message appears just after copying 2GB.

Expected Results:  
Large file should be copied.
Comment 1 Alexander LAW 2014-11-12 21:23:00 UTC
Created attachment 89566 [details]
This patch removes 2 GB limit.
Comment 2 Marcus Meissner 2014-11-13 06:59:08 UTC
Thanks!

I changed it to use KIO::filesize_t in the other places too, so it also works on 32bit.

http://commits.kde.org/kamera/fbd0459f81e2bba890c8033bc6bf1c6bc7bbf52f

is in master
Comment 3 Marcus Meissner 2014-11-13 07:00:57 UTC
also pushed to 4.14 and 4.13 branches
Comment 4 Alexander LAW 2014-11-13 07:46:31 UTC
Thank you.
I changed the type to "unsigned long int" to have the same type as gp_file_get_data_and_size has for size:
http://www.gphoto.org/doc/api/gphoto2-file_8c.html#afe4a2c1685df174f61f20b2986edd93b