Skip to content

Commit

Permalink
Merge pull request #18857 from ghouscht/fix-govet-shadow
Browse files Browse the repository at this point in the history
build: fix govet shadow err
  • Loading branch information
jmhbnz authored Nov 8, 2024
2 parents b125409 + 97d19b6 commit 1ee6598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/storage/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ func (b *backend) defrag() error {
tmpdb, err := bolt.Open(tdbp, 0600, &options)
if err != nil {
temp.Close()
if err := os.Remove(temp.Name()); err != nil && b.lg != nil {
if rmErr := os.Remove(temp.Name()); rmErr != nil && b.lg != nil {
b.lg.Error(
"failed to remove temporary file",
zap.String("path", temp.Name()),
zap.Error(err),
zap.Error(rmErr),
)
}

Expand Down

0 comments on commit 1ee6598

Please sign in to comment.