Skip to content
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

Fix bug: high word of size for compressed files on windows was ignored #4

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

Mart-Bogdan
Copy link
Contributor

bugreport-ds

There was a null pointer passing in all the time. This signaled to function that we "don't want" high word.

In C (or in win API at least) it's a common pattern to accept pointers for optional arguments.

Notice, if you would work with such APIs in future.

In case when we need to check pointers for zero, like was in the original code: then the function would accept double pointer ( void**). Then we have a local variable defined as a regular pointer and an argument defined as a double-pointer. Then library could write something into our pointer.

P.S. I'm not sure if I should bump version instead of a maintainer, but made it just in case.

@Mart-Bogdan
Copy link
Contributor Author

Hello @scullionw. I hope you would find time to review/merge My PR. Because currently functionality of compressed files is broken on Windows.

@scullionw
Copy link
Owner

Hi! sorry for the delay! I had indeed misunderstood the docs.

Thanks for the PR, it looks good to me!

@scullionw scullionw merged commit c9b26cc into scullionw:master Dec 13, 2021
@Mart-Bogdan
Copy link
Contributor Author

Thanks. Perhaps I would be able to work on #5 next week.

@Mart-Bogdan
Copy link
Contributor Author

Mart-Bogdan commented Dec 13, 2021

it's sad that on Linux in btrfs you need CAP_SYSADMIN (which practically means being root) to be able to get compressed file size :-(

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.

2 participants