Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion synkronus/pkg/appbundle/versioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (s *Service) PushBundle(ctx context.Context, zipReader io.Reader) (*Manifes
if err != nil {
return nil, fmt.Errorf("failed to open zip file: %w", err)
}
defer zipFile.Close()
// Note: We'll close zipFile explicitly before copying tempZipFile to bundle.zip

// Validate the bundle structure
if err := s.validateBundleStructure(&zipFile.Reader); err != nil {
Expand Down Expand Up @@ -123,6 +123,9 @@ func (s *Service) PushBundle(ctx context.Context, zipReader io.Reader) (*Manifes
dstFile.Close()
}

// Close the zip reader before copying the temp file
zipFile.Close()

// Save the original zip to the version directory for direct download
if _, err := tempZipFile.Seek(0, 0); err != nil {
return nil, fmt.Errorf("failed to rewind zip for saving: %w", err)
Expand Down
Loading