From ffec58a5d2461c81a4d5661b17628dcd2d628c3d Mon Sep 17 00:00:00 2001 From: Thorsten de Buhr Date: Thu, 11 Jan 2024 11:04:00 +0100 Subject: [PATCH] fixed: crash todo: proper handling of "file:///" for Windows/Linux/Mac --- cmd/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/utils.go b/cmd/utils/utils.go index 48f3227..1bc0d00 100644 --- a/cmd/utils/utils.go +++ b/cmd/utils/utils.go @@ -220,7 +220,7 @@ func CheckConnection(url string, timeOut int) error { // FileExists checks if filePath is an actual file in the local file system func FileExists(filePath string) bool { info, err := os.Stat(filePath) - if os.IsNotExist(err) { + if info == nil || os.IsNotExist(err) { return false } return !info.IsDir()