From 03e8e4b2e24fa726472ec57cd5eee693ae4d9d9e Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 24 Oct 2025 17:23:32 +0200 Subject: [PATCH] Update FileExist to use errors.Is for checking existence --- common/path.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.