Fix for servers/gophermap with bad line endings
e.g: gopher://pollett.org/
This commit is contained in:
parent
0f4bedb6c5
commit
435112fefe
@ -385,7 +385,7 @@ func (i *Item) FetchDirectory() (Directory, error) {
|
|||||||
scanner.Split(bufio.ScanLines)
|
scanner.Split(bufio.ScanLines)
|
||||||
|
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Text()
|
line := strings.Trim(scanner.Text(), "\r\n")
|
||||||
|
|
||||||
if len(line) == 0 {
|
if len(line) == 0 {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user