Skip to content

pkg create: add missing snap.Close()#2206

Open
omar-polo wants to merge 1 commit into
mainfrom
op/pkg-snap-close
Open

pkg create: add missing snap.Close()#2206
omar-polo wants to merge 1 commit into
mainfrom
op/pkg-snap-close

Conversation

@omar-polo

Copy link
Copy Markdown
Contributor

No description provided.

@omar-polo
omar-polo force-pushed the op/pkg-snap-close branch from f39f6e7 to 9d1eb85 Compare June 15, 2026 10:01
poolpOrg
poolpOrg previously approved these changes Jun 15, 2026
@poolpOrg
poolpOrg dismissed their stale review June 15, 2026 10:36

mathieu convinced me it's not right

Comment thread subcommands/pkg/create.go
if err := snap.Close(); err != nil {
return 1, fmt.Errorf("failed to close snapshot: %w", err)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closes the scanCache, which is then used in CommitTransaction AFAIK to publish the delta state to teh repository. Am I missing something obvious?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i forgot some context in this, sorry.

this diff was before i discovered the issue on windows, when i was still searching for possible causes.

I was comparing pkg/create.go with subcommands/ptar and noticed the missing close, but it wasn't the fix obviously :)

in subcommands/ptar we do close the snap, look: https://github.com/PlakarKorp/plakar/blob/main/subcommands/ptar/ptar.go#L378-L381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants