diff --git a/common/path.go b/common/path.go index 4b46bdfd43..4f136d5fab 100644 --- a/common/path.go +++ b/common/path.go @@ -24,7 +24,7 @@ import ( // FileExist checks if a file exists at filePath. func FileExist(filePath string) bool { _, err := os.Stat(filePath) - return !os.IsNotExist(err) + return !errors.Is(err, fs.ErrNotExist) } // AbsolutePath returns datadir + filename, or filename if it is absolute.