Remove some unnecessary errors

This commit is contained in:
Adnan Maolood
2020-11-04 23:46:05 -05:00
parent 95716296b4
commit cec1f118fb
4 changed files with 12 additions and 18 deletions

4
fs.go
View File

@@ -96,9 +96,9 @@ func openFile(p string) (File, error) {
if stat.Mode().IsRegular() {
return f, nil
}
return nil, ErrNotAFile
return nil, os.ErrNotExist
} else if !stat.Mode().IsRegular() {
return nil, ErrNotAFile
return nil, os.ErrNotExist
}
}
return f, nil