parent
813c8a8384
commit
d2c44e311e
@ -173,7 +173,7 @@ func (mock *ftpMock) listen() {
|
|||||||
|
|
||||||
mock.dataConn.Wait()
|
mock.dataConn.Wait()
|
||||||
mock.printfLine("150 Opening ASCII mode data connection for file list")
|
mock.printfLine("150 Opening ASCII mode data connection for file list")
|
||||||
mock.dataConn.write([]byte("-rw-r--r-- 1 ftp wheel 0 Jan 29 10:29 lo"))
|
mock.dataConn.write([]byte("-rw-r--r-- 1 ftp wheel 0 Jan 29 10:29 lo\r\ntotal 1"))
|
||||||
mock.printfLine("226 Transfer complete")
|
mock.printfLine("226 Transfer complete")
|
||||||
mock.closeDataConn()
|
mock.closeDataConn()
|
||||||
case "NLST":
|
case "NLST":
|
||||||
|
4
ftp.go
4
ftp.go
@ -640,9 +640,7 @@ func (c *ServerConn) List(path string) (entries []*Entry, err error) {
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
entry, errParse := parser(scanner.Text(), now, c.options.location)
|
entry, errParse := parser(scanner.Text(), now, c.options.location)
|
||||||
if errParse != nil {
|
if errParse == nil {
|
||||||
errs = multierror.Append(errs, errParse)
|
|
||||||
} else {
|
|
||||||
entries = append(entries, entry)
|
entries = append(entries, entry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user