pkg create: add missing snap.Close()#2206
Open
omar-polo wants to merge 1 commit into
Open
Conversation
omar-polo
force-pushed
the
op/pkg-snap-close
branch
from
June 15, 2026 10:01
f39f6e7 to
9d1eb85
Compare
poolpOrg
previously approved these changes
Jun 15, 2026
mathieu-plak
requested changes
Jun 15, 2026
| if err := snap.Close(); err != nil { | ||
| return 1, fmt.Errorf("failed to close snapshot: %w", err) | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
This closes the scanCache, which is then used in CommitTransaction AFAIK to publish the delta state to teh repository. Am I missing something obvious?
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.