Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

large reads fail #123

Open
profezzorn opened this issue Jun 28, 2017 · 2 comments
Open

large reads fail #123

profezzorn opened this issue Jun 28, 2017 · 2 comments

Comments

@profezzorn
Copy link

The bulkRead function stops when it receives a short read, but it really should just look at the length in the mtp header and read that many bytes. The zero packet expectation is also wrong as the packet size is not 512 on all devices. (It's 64 on my device.) Also, if there is a short read, that is the zero packet, so that would mean that the code expects two zero packets in some cases?

It should be easier to just ignore the packet boundaries and just read the right number of bytes.

If I have some time, I'll work up a pull request later.

@hanwen
Copy link
Owner

hanwen commented Jun 28, 2017 via email

@hanwen
Copy link
Owner

hanwen commented Jan 4, 2020

sorry for the delay here. I rarely work on go-mtpfs these days.

in commit 14927b3, I made the MTP code use the maxpacketsize as packet size. I'd be interested to hear if this fixes your problem here with the 64 byte packet size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants