Another fix for the line parser

This commit is contained in:
Julian Kornberger
2015-12-28 12:17:09 +01:00
parent 107079411b
commit 1fc6b70adc
2 changed files with 5 additions and 0 deletions

4
ftp.go
View File

@@ -347,6 +347,10 @@ func parseLsListLine(line string) (*Entry, error) {
return e, nil
}
if len(fields) < 8 {
return nil, errUnsupportedListLine
}
if fields[1] == "0" {
e := &Entry{
Type: EntryTypeFile,