cmd/cloudflared: fix dropped error

This commit is contained in:
Lars Lehtonen 2023-12-14 14:09:29 -08:00
parent b901d73d9b
commit 906bdb8806
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2
1 changed files with 2 additions and 1 deletions

View File

@ -124,8 +124,9 @@ func openFile(path string, create bool) (file *os.File, exists bool, err error)
if err != nil {
return nil, false, err
}
var fileInfo os.FileInfo
if create {
fileInfo, err := os.Stat(expandedPath)
fileInfo, err = os.Stat(expandedPath)
if err == nil && fileInfo.Size() > 0 {
return nil, true, nil
}