libunftp icon indicating copy to clipboard operation
libunftp copied to clipboard

Implement MLSD & fix MLST

Open procr1337 opened this issue 4 months ago • 3 comments

Disclaimer: A lot of this code was written with AI assistance. I reviewed it & improved the test coverage.

Additional fixes (in separate commits which can be cherry-picked if needed):

  1. MLST output was incorrect/out of spec. Output was something like 213 <facts> filename, where it should be a multi-line format initiated by 250- and ended by 250 , as per https://datatracker.ietf.org/doc/html/rfc3659#section-7.2
  2. There was a small bug where uid was used instead of gid for MLST facts
  3. As noted correclty by @LLeny, facts list must be terminated by semicolon. Grammar from RFC: facts = 1*( fact ";" )

Since async_ftp does not support MLST nor MLSD, we (Claude and me :) added manual TCP-based tests for both commands in the existing sbe-fs integration test suite. This is obviously weaker since we don't have a compliant client to check against. In addition, I manually tested this against rclone's FTP client and FileZilla.

procr1337 avatar Aug 29 '25 08:08 procr1337

Small issue, I believe the rfc states that all facts must end with a ';', even the last one. It's problematic with the rclone ftp implementation.

LLeny avatar Oct 21 '25 12:10 LLeny

@LLeny you are absolutely right, thank you! I didn't encounter any issues in my testing with rclone however

procr1337 avatar Nov 02 '25 19:11 procr1337

@procr1337 For reference, I did, there: https://github.com/LLeny/proton-drive-bridge/issues/9

LLeny avatar Nov 03 '25 05:11 LLeny

Thank you @procr1337 and @LLeny

hannesdejager avatar Dec 20 '25 21:12 hannesdejager