johnae / sambal

Ruby Samba Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't handles files with consecutive whitespace characters

Wardrop opened this issue · comments

Your regex for parsing the result of the ls command assumes files cannot have consecutive whitespaces characters, but they can, in which case your ls returns garbage entries. I would do a patch, but I'm actually no longer using your library for the project I'm working on. I just thought you'd like to know of the problem.

Something like this may be a more robust...

/\s*(.+?)\s+([A-Z])\s+([0-9]+)\s+(.+)/

Cheers,
Tom

Thanks. I'll consider making a patch.