Handle directory with CRLF.CRLF terminators
This commit is contained in:
parent
65cbf62f8a
commit
4f2a87b748
@ -368,9 +368,14 @@ func (i *Item) FetchDirectory() (Directory, error) {
|
|||||||
|
|
||||||
var d Directory
|
var d Directory
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
|
if len(bytes.Trim(line, "\r\n")) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if len(line) == 1 && line[0] == END {
|
if len(line) == 1 && line[0] == END {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
var i Item
|
var i Item
|
||||||
err := i.parse(line)
|
err := i.parse(line)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user