1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:24:58 +00:00

Everywhere: Remove unintentional partial stream reads and writes

This commit is contained in:
Tim Schumacher 2023-03-01 17:24:50 +01:00 committed by Linus Groh
parent 26516ee160
commit ae51c1821c
44 changed files with 109 additions and 192 deletions

View file

@ -188,8 +188,7 @@ static ErrorOr<void> write_to_file(String const& path)
for (size_t i = 0; i < g_repl_statements.size(); i++) {
auto line = g_repl_statements[i].bytes();
if (line.size() > 0 && i != g_repl_statements.size() - 1) {
// FIXME: This should write the entire span.
TRY(file->write_some(line));
TRY(file->write_until_depleted(line));
}
if (i != g_repl_statements.size() - 1) {
TRY(file->write_value('\n'));