diff --git a/Userland/Applications/Browser/DownloadWidget.cpp b/Userland/Applications/Browser/DownloadWidget.cpp index 4b2fb937d6..880f9b4566 100644 --- a/Userland/Applications/Browser/DownloadWidget.cpp +++ b/Userland/Applications/Browser/DownloadWidget.cpp @@ -8,9 +8,8 @@ #include #include #include -#include -#include #include +#include #include #include #include @@ -46,13 +45,13 @@ DownloadWidget::DownloadWidget(const URL& url) }; { - auto file_or_error = Core::File::open(m_destination_path, Core::OpenMode::WriteOnly); + auto file_or_error = Core::Stream::File::open(m_destination_path, Core::Stream::OpenMode::Write); if (file_or_error.is_error()) { GUI::MessageBox::show(window(), String::formatted("Cannot open {} for writing", m_destination_path), "Download failed", GUI::MessageBox::Type::Error); window()->close(); return; } - m_output_file_stream = make(*file_or_error.value()); + m_output_file_stream = file_or_error.release_value(); } m_download->on_finish = [this](bool success, auto) { did_finish(success); }; diff --git a/Userland/Applications/Browser/DownloadWidget.h b/Userland/Applications/Browser/DownloadWidget.h index 7d544eb9e4..8b37aab4ed 100644 --- a/Userland/Applications/Browser/DownloadWidget.h +++ b/Userland/Applications/Browser/DownloadWidget.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ private: RefPtr m_close_button; RefPtr m_close_on_finish_checkbox; RefPtr m_browser_image; - OwnPtr m_output_file_stream; + OwnPtr m_output_file_stream; Core::ElapsedTimer m_elapsed_timer; };