Commit 01d86c93 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

UnionFs: Use ioutil.ReadFile in test.

parent 6584ea29
......@@ -55,20 +55,9 @@ func writeToFile(path string, contents string) {
}
func readFromFile(path string) string {
f, err := os.Open(path)
fuse.CheckSuccess(err)
fi, err := os.Stat(path)
content := make([]byte, fi.Size)
n, err := f.Read(content)
fuse.CheckSuccess(err)
if n < int(fi.Size) {
panic("short read.")
}
err = f.Close()
fuse.CheckSuccess(err)
return string(content)
b, err := ioutil.ReadFile(path)
CheckSuccess(err)
return string(b)
}
func dirNames(path string) map[string]bool {
......
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