Add a case to catch Unix-like but 0 link count list line
I happened upon this with hostedftp.com: -r-------- 0 user group 65222236 Feb 24 00:39 UABlacklistingWeek8.csv Otherwise a fine Unix-like list line, but link count is 0 for some reason. That company wasn't able to tell me why.
This commit is contained in:
@@ -56,6 +56,9 @@ var listTests = []line{
|
||||
{"drwxr-xr-x 3 110 1002 3 Dec 02 2009 spaces dir name", "spaces dir name", 0, EntryTypeFolder, time.Date(2009, time.December, 2, 0, 0, 0, 0, time.UTC)},
|
||||
{"-rwxr-xr-x 3 110 1002 1234567 Dec 02 2009 file name", "file name", 1234567, EntryTypeFile, time.Date(2009, time.December, 2, 0, 0, 0, 0, time.UTC)},
|
||||
{"-rwxr-xr-x 3 110 1002 1234567 Dec 02 2009 foo bar ", " foo bar ", 1234567, EntryTypeFile, time.Date(2009, time.December, 2, 0, 0, 0, 0, time.UTC)},
|
||||
|
||||
// Odd link count from hostedftp.com
|
||||
{"-r-------- 0 user group 65222236 Feb 24 00:39 RegularFile", "RegularFile", 65222236, EntryTypeFile, time.Date(thisYear, time.February, 24, 0, 39, 0, 0, time.UTC)},
|
||||
}
|
||||
|
||||
// Not supported, we expect a specific error message
|
||||
|
||||
Reference in New Issue
Block a user