Skip to content

Commit

Permalink
remove os.IsExist useless condition on os.Stat
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Nov 19, 2024
1 parent 17d0b8e commit 37f21e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blockpoller/state_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ func (p *BlockPoller) isStateFileExist(stateStorePath string) bool {
}
fp := filepath.Join(stateStorePath, "cursor.json")
_, err := os.Stat(fp)
exist := err == nil || os.IsExist(err)
exist := err == nil
p.logger.Info("cursor file check",
zap.String("state_store_path", stateStorePath),
zap.Bool("exist", exist),
zap.Error(err),
)
return exist
}
Expand Down

0 comments on commit 37f21e7

Please sign in to comment.