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

xsv might silently fail #320

Open
lukaslueg opened this issue Apr 27, 2023 · 0 comments
Open

xsv might silently fail #320

lukaslueg opened this issue Apr 27, 2023 · 0 comments

Comments

@lukaslueg
Copy link

xsv/src/cmd/index.rs

Lines 55 to 58 in 4278b85

let mut wtr = io::BufWriter::new(fs::File::create(&pidx)?);
RandomAccessSimple::create(&mut rdr, &mut wtr)?;
Ok(())
}

Notice that there is a bug here: If the output is small enough to delay flushing the BufWriter until the (implicit) drop at the end of the scope, the BufWriter might fail for whatever reason to write to the underlying, yet its destructor will silently discard the error.

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

No branches or pull requests

1 participant