MEGA65 / mega65-tools

Tools and Utilities for the MEGA65 Retro Computers
GNU General Public License v3.0
30 stars 32 forks source link

MEGA65_FTP: On put command, sometimes has 'ERROR: Short read: Only got xxx bytes' #33

Closed gurcei closed 3 years ago

gurcei commented 3 years ago

Based on this discord discussion:

https://discord.com/channels/719326990221574164/805492126128930846/806653520589357066


As for the error message you got when doing the put:

-c "put /Users/.../Downloads/Zauberschloss2.prg"

Zauberschloss2.prg does not yet exist on the file system -- searching for empty directory slot to create it in.
dir_cluster = $2, dir_sector = $6128
Uploaded 18432 bytes.ERROR: Short read: Only got 368 bytes
Uploaded 19312 bytes in 1 seconds (18.9KB/sec)

Yep, I've seen this error before on my side, even on a successful put.

It's something I haven't debugged yet, though interestingly, if I do a get of the uploaded file immediately after such a put, and then diff the two files, they are identical.

gurcei commented 3 years ago

Tayger noticed that the error message doesn't appear for files that are on 512-byte boundaries exactly (E.g. 819,200 bytes), but does surface when a file is not on a 512-byte boundary (E.g. a file that is 1000 bytes long).

gurcei commented 3 years ago

This is a small change to fix, so I've fixed it within my work for card #5