parse-listing
parse-listing copied to clipboard
FIXED: do not trim names that start with a space
If filenames started with a space (which is a valid name in Unix), these spaces would be removed from the returned listing, returning.
For example:
--rw-r----- 1 userName alternc 460 Aug 22 03:45 test1
--rw-r----- 1 userName alternc 560 Aug 22 03:47 test2
Would return two wrong names: "test1" and "test2" instead of " test1" and " test2".
I added a new test for this particular case.