mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
Update path.go
This commit is contained in:
parent
b1809d13d1
commit
f7127d6ce1
1 changed files with 1 additions and 4 deletions
|
|
@ -24,10 +24,7 @@ import (
|
|||
// FileExist checks if a file exists at filePath.
|
||||
func FileExist(filePath string) bool {
|
||||
_, err := os.Stat(filePath)
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return !os.IsNotExist(err)
|
||||
}
|
||||
|
||||
// AbsolutePath returns datadir + filename, or filename if it is absolute.
|
||||
|
|
|
|||
Loading…
Reference in a new issue