diff --git a/initialization/migrate_metadata.go b/initialization/migrate_metadata.go index c1540b420..db6907952 100644 --- a/initialization/migrate_metadata.go +++ b/initialization/migrate_metadata.go @@ -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)) }