summaryrefslogtreecommitdiff
path: root/Userland/Utilities/headless-browser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities/headless-browser.cpp')
-rw-r--r--Userland/Utilities/headless-browser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp
index 7453120887..0eb070c1fb 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -174,8 +174,7 @@ static ErrorOr<NonnullRefPtr<Core::Timer>> load_page_for_screenshot_and_exit(Cor
auto output_file = MUST(Core::File::open(output_file_path, Core::File::OpenMode::Write));
auto image_buffer = MUST(Gfx::PNGWriter::encode(*screenshot));
- // FIXME: This should write the entire buffer.
- MUST(output_file->write_some(image_buffer.bytes()));
+ MUST(output_file->write_until_depleted(image_buffer.bytes()));
} else {
warnln("No screenshot available");
}