Skip to content

Commit

Permalink
Add another missing close
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Sep 21, 2023
1 parent cac528d commit 3fcd05a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions initialization/migrate_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ func migrateV0(dir string, logger *zap.Logger) (err error) {
return fmt.Errorf("failed to determine metadata version: %w", err)
}

if err := file.Close(); err != nil {
return fmt.Errorf("failed to close metadata file: %w", err)
}

if len(old.NodeId) != 32 {
return fmt.Errorf("invalid node ID length: %d", len(old.NodeId))
}
Expand Down

0 comments on commit 3fcd05a

Please sign in to comment.