Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

storage/filesystem: keep packs open in PackfileIter#962

Merged
mcuadros merged 2 commits intosrc-d:masterfrom
jfontan:fix/do-not-close-files-in-iterator
Sep 21, 2018
Merged

storage/filesystem: keep packs open in PackfileIter#962
mcuadros merged 2 commits intosrc-d:masterfrom
jfontan:fix/do-not-close-files-in-iterator

Conversation

@jfontan
Copy link
Contributor

@jfontan jfontan commented Sep 20, 2018

PackfileIter was not taking into account the option KeepDescriptors and was always closing the file. This caused "file already closed" errors when iterating packfiles in with KeepDescriptors active.

PackfileIter was not taking into account the option KeepDescriptors
and was always closing the file. This caused "file already closed"
errors when iterating packfiles in with KeepDescriptors active.

Signed-off-by: Javi Fontan <jfontan@gmail.com>
keepPack bool
}

// NewPackfileIter returns a new EncodedObjectIter for the provided packfile
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some documentation about keepPack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Javi Fontan <jfontan@gmail.com>
@mcuadros mcuadros merged commit c2ab4ac into src-d:master Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants