New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress meter for BZ2 file import #2776

merged 1 commit into from Apr 29, 2017


None yet
2 participants

fcarreiro commented Apr 29, 2017

There doesn't seem to be a way to tell the current reading location of the original file using the BZip2 library. What I do is to keep the original file handle (which BZip2 uses internally) and use ftell on that to get the offset.

To be able to pass the file handle to BZip2 (as opposed to the file name) it was necessary to use more low-level functions of the library. This added some extra code that is slightly different when opening for read or write.

Also included some minor de-duplication of file closing code.

@dmoagx dmoagx merged commit 2b081c2 into sequelpro:master Apr 29, 2017


This comment has been minimized.


fcarreiro commented Apr 29, 2017

Wow that was fast. Thanks!

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