Skip to content

Commit

Permalink
Close the input file before writing the final output
Browse files Browse the repository at this point in the history
  • Loading branch information
fmang committed May 28, 2023
1 parent 49bb948 commit 70500a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ static void run_single(const ot::options& opt, const std::string& path_in, const
ot::ogg_writer writer(output);
writer.path = path_out;
process(reader, &writer, opt);

// Close the input file and finalize the output. When --in-place is specified, some file
// systems like SMB require that the input is closed first.
input.reset();
temporary_output.commit();
}

Expand Down

0 comments on commit 70500a6

Please sign in to comment.