It appears that ls and dl should use the same algorithm for fetching data from the brick. Also, as CONTINUE_LIST_FILES is implemented in new EV3 firmwares, it is possible to reuse a the download algorithm for full ls implementation. This PR makes the ls and dl source code almost identical.
I have tested the changes against the stock 1.10E firmware and it seems to work correctly. If there is a regression, it should only trigger on directories with >1012 byte directory listings, as only then the CONTINUE_LIST_FILES command is issued.
It appears that ls and dl should use the same algorithm for fetching data from the brick. Also, as CONTINUE_LIST_FILES is implemented in new EV3 firmwares, it is possible to reuse a the download algorithm for full ls implementation. This PR makes the ls and dl source code almost identical.
I have tested the changes against the stock 1.10E firmware and it seems to work correctly. If there is a regression, it should only trigger on directories with >1012 byte directory listings, as only then the CONTINUE_LIST_FILES command is issued.
Fixes https://github.com/c4ev3/ev3duder/issues/18