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

bxz::ofstream::close() produces a zero-byte file #2

Open
tmaklin opened this issue Mar 28, 2020 · 0 comments
Open

bxz::ofstream::close() produces a zero-byte file #2

tmaklin opened this issue Mar 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@tmaklin
Copy link
Owner

tmaklin commented Mar 28, 2020

When run with the code

#include "bxzstr.hpp"
#include <iostream>

int main(int argc, char** argv){
    bxz::ofstream out("test.gz", bxz::z, 1);
    for(long long i = 0; i < 10; i++){
        out << i << "\n";
    }
    out.close();
}

closing the file will not write anything (test.gz will be zero bytes). Flushing the stream and then closing will perform the write but using either separately fails.

@tmaklin tmaklin added the bug Something isn't working label Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant