Commit 7c77e450 authored by Russ Cox's avatar Russ Cox

net: do not require newline at end of resolv.conf

Fixes #686.

R=adg
CC=golang-dev
https://golang.org/cl/961046
parent 0485ba72
...@@ -35,6 +35,11 @@ func (f *file) getLineFromData() (s string, ok bool) { ...@@ -35,6 +35,11 @@ func (f *file) getLineFromData() (s string, ok bool) {
return return
} }
} }
if len(f.data) > 0 {
s = string(data)
f.data = nil
ok = true
}
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment