Skip to content

Commit

Permalink
Update internal/utils/paths.go
Browse files Browse the repository at this point in the history
Co-authored-by: Simone Basso <bassosimone@gmail.com>
  • Loading branch information
hellais and bassosimone committed Jan 7, 2021
1 parent 3331da3 commit 97436f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/utils/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ func DBDir(home string, name string) string {
}

func FileExists(path string) bool {
if _, err := os.Stat(path); os.IsNotExist(err) {
return false
}
return true
stat, err := os.Stat(path)
return err == nil && stat.Mode().IsRegular()
}

// ResultTimestamp is a windows friendly timestamp
Expand Down Expand Up @@ -97,4 +95,4 @@ func AcceptInformedConsent() error {
return err
}
return nil
}
}

0 comments on commit 97436f0

Please sign in to comment.