veeso / suppaftp

a super FTP/FTPS client library for Rust with support for both passive and active mode
Apache License 2.0
121 stars 31 forks source link

[BUG] - list parser: SyntaxError on name that starts with 2 numbers #69

Closed clonejo closed 9 months ago

clonejo commented 10 months ago

Description

A file called 01 1234 foo.mp3 breaks the file listing parser.

Reducing the file name to one number makes the example below work.

Steps to reproduce

let file: File = dbg!(File::from_str(
    "-r--r--r--    1 23        23         1234567 Jan 1  2000 01 1234 foo.mp3",
))
.ok()
.unwrap();
assert_eq!(file.name, "01 1234 foo.mp3");

File::from_str() returns SyntaxError.

Environment

veeso commented 9 months ago

78aee867