You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#123>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB7O3YHLY5kUGMRN9PD_B2s4UKm7H8Jks5sIfrEgaJpZM4OHkXG>
.
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.
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.
The text was updated successfully, but these errors were encountered: