Fixes #21075
Change-Id: Idfe5002dfe17943844d9427e27f82ce894b92e80
Reviewed-on: https://go-review.googlesource.com/50270
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if file == nil {
return nil, ErrInvalid
}
- if file == nil {
- return nil, syscall.EINVAL
- }
+
if file.isdir() {
// I don't know any better way to do that for directory
return Stat(file.dirinfo.path)