Bug 340908

Summary: kamera KIO Slave can't copy large files (>2GB)
Product: [Frameworks and Libraries] kio Reporter: Alexander LAW <a.lahin>
Component: kameraAssignee: Marcus Meissner <marcus>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 4.13.3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: This patch removes 2 GB limit.

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