mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-24 03:49:45 +00:00
pkg/osutil: fix IsExist
Currently it returns true for "/some/existing/file/foo" because that returns ENOTDIR.
This commit is contained in:
parent
b6e969be7a
commit
4799d21e01
@ -74,7 +74,7 @@ func Abs(path string) string {
|
||||
// IsExist returns true if the file name exists.
|
||||
func IsExist(name string) bool {
|
||||
_, err := os.Stat(name)
|
||||
return err == nil || !os.IsNotExist(err)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// HandleInterrupts closes shutdown chan on first SIGINT
|
||||
|
Loading…
Reference in New Issue
Block a user