Skip to content

Fix GetEntry / MLST for servers which send multiple spaces #422

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ncw
Copy link
Contributor

@ncw ncw commented Feb 19, 2025

Some servers seem to send multiple spaces at the end of an MLST response.

MLST Workspace
250-Listing Workspace
  size=0;type=dir;perm=rwx;modify=20250218125218; /Workspace
250 End

Before this change this would cause the GetEntry method to return this
error.

unsupported LIST line

This patch ignores zero or more spaces at the start of the MLST response.

This was originally discovered in rclone/rclone#8403

@coveralls
Copy link

Coverage Status

coverage: 72.431%. remained the same
when pulling 4be4335 on rclone:fix-MLST-multiple-spaces
into 2455144 on jlaffaye:master.

Some servers seem to send multiple spaces at the end of an MLST response.

    MLST Workspace
    250-Listing Workspace
      size=0;type=dir;perm=rwx;modify=20250218125218; /Workspace
    250 End

Before this change this would cause the GetEntry method to return this
error.

    unsupported LIST line

This patch ignores zero or more spaces at the start of the MLST response.
@ncw ncw force-pushed the fix-MLST-multiple-spaces branch from 4be4335 to 1fa62b3 Compare February 19, 2025 21:02
@ncw
Copy link
Contributor Author

ncw commented Feb 19, 2025

Not sure why it says "This branch must not contain merge commits." there are no merge commits in the branch.

The CodeQL tests have failed for what must be an unrelated reason "Error: Cannot read properties of undefined (reading 'length')".

The unit tests have blown up too! go test worked fine when I ran it locally. These are failing with "Error: Gateway Time-out (504)" on Coveralls.

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

Successfully merging this pull request may close these issues.

2 participants