mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibFileSystemAccessClient+Userland: Return file paths as ByteStrings
Where it was straightforward to do so, I've updated the users to also use ByteStrings for their file paths, but most of them have a temporary String::from_byte_string() call instead.
This commit is contained in:
parent
5a99a6afb4
commit
44ca55aaf8
23 changed files with 50 additions and 53 deletions
|
@ -63,13 +63,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto file_menu = window->add_menu("&File"_string);
|
||||
file_menu->add_action(GUI::CommonActions::make_save_as_action([&](auto&) {
|
||||
AK::ByteString filename = "file for saving";
|
||||
ByteString filename = "file for saving";
|
||||
auto do_save = [&]() -> ErrorOr<void> {
|
||||
auto response = FileSystemAccessClient::Client::the().save_file(window, "Capture", "png");
|
||||
if (response.is_error())
|
||||
return {};
|
||||
auto file = response.value().release_stream();
|
||||
auto path = AK::LexicalPath(response.value().filename().to_byte_string());
|
||||
auto path = LexicalPath(response.value().filename());
|
||||
filename = path.basename();
|
||||
auto encoded = TRY(dump_bitmap(magnifier->current_bitmap(), path.extension()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue