Skip to content

Conversation

@ArnauCForgeFlow
Copy link

The method fs.ls() fails to correctly parse FTP filenames with spaces. This change bypasses fs.ls for the FTP protocol and uses the underlying fs.ftp.nlst() method directly, which returns the correct full filenames.

Assume a directory /data exists on the FTP server containing a file named "my file.txt".

Actual output when using fs.ls with ftp protocol:
['/data/file.txt']

Expected Output:
['/data/my file.txt']

Since this seems to be a bug in the fsspec library, I used fs.ftp.nlst() as a workaround. I've also reported the issue on their GitHub: fsspec/filesystem_spec#1970

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.

1 participant