Skip to content

Commit

Permalink
fix normal file output
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwei-handsome committed May 18, 2024
1 parent c9d955a commit eb6d524
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ fn get_output_writer(outputpath: &str, rewrite: bool) -> Result<Box<dyn Write>,
BUFFER_SIZE,
bzip2::write::BzEncoder::new(file, bzip2::Compression::new(compression_level)),
))
} else if outputpath != "-" {
Box::new(BufWriter::with_capacity(BUFFER_SIZE, file))
} else {
Box::new(BufWriter::new(stdout()))
};
Expand Down

0 comments on commit eb6d524

Please sign in to comment.