icetee / node-ftp

An FTP client module for node.js
MIT License
25 stars 16 forks source link

Expression unable to parse following directory listing #6

Closed hajekj closed 6 years ago

hajekj commented 6 years ago

I have a following listing in FTP, the client doesn't seem to be able to parse it.

drwxr-S---    3 105207   501            18 Jul 04  2017 .pki

Update: It appears like the regex here is omitting S in the permissions and the directory listing appears to miss the size value - I wasn't able to find any RFC specification whether the size has to be specified.

Update 2: I was able to find this: https://files.stairways.com/other/ftp-list-specs-info.txt and http://cr.yp.to/ftp/list/binls.html

Update 3: I found this library which seems to handle the parsing quite good: https://github.com/patrickjuchli/basic-ftp, maybe you can take some inspiration?

icetee commented 6 years ago

Soon I will look.

icetee commented 6 years ago

@hajekj I changed the regexp. Do you have the opportunity to test?

hajekj commented 6 years ago

Works fine! Please release an updated version when possible.

icetee commented 6 years ago

I've released v1.0.3 the new version. Thanks for submitting the issue.