Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[buteo-mtp] Fix unable of copy big files to SD card over MTP. Fixes J…
…B#50733. The problem is unable to copy big file (more 300 Mb) from host PC to SD card over MTP. At Linux after about 1-2 minutes from start: "libmtp error: Could not send object property list". Files appears but MD sums are not matched. At Windows on laptop: after about 1-2 minutes the copy progress bar disappears without any notification. It seems that ftruncate (called from fsstorageplugin.cpp:1305 ... if( !file.resize(size)) ... for big file continues too long, because it tries to fill memory on SD with zeros. strace -r /usr/lib/mtp/mtp_service ... 0.000400 ftruncate64(21, 584411895) = 0 124.915724 close(21) = 0 ... So PC host close connection by timeout. For resolve this issue we can use another method memory allocation.
- Loading branch information