mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 18:27:36 +00:00
LibFileSystem+Userland: Return ByteString from real_path()
This commit is contained in:
parent
cdf17efb9a
commit
56c5ffe398
25 changed files with 44 additions and 40 deletions
|
@ -56,7 +56,7 @@ void ConnectionFromClient::request_file_handler(i32 request_id, i32 window_serve
|
|||
|
||||
if (prompt == ShouldPrompt::Yes) {
|
||||
VERIFY(window_server_client_id != -1 && parent_window_id != -1);
|
||||
auto exe_name = LexicalPath::basename(exe_path.to_byte_string());
|
||||
auto exe_name = LexicalPath::basename(exe_path);
|
||||
auto text = String::formatted("Allow {} ({}) to {} \"{}\"?", exe_name, pid, access_string, path).release_value_but_fixme_should_propagate_errors();
|
||||
auto result = GUI::MessageBox::try_show({}, window_server_client_id, parent_window_id, text, "File Permissions Requested"sv).release_value_but_fixme_should_propagate_errors();
|
||||
approved = result == GUI::MessageBox::ExecResult::Yes;
|
||||
|
|
|
@ -318,7 +318,7 @@ void Launcher::for_each_handler_for_path(ByteString const& path, Function<bool(H
|
|||
}
|
||||
auto real_path = real_path_or_error.release_value();
|
||||
|
||||
return for_each_handler_for_path(real_path.to_byte_string(), [&](auto const& handler) -> bool {
|
||||
return for_each_handler_for_path(real_path, [&](auto const& handler) -> bool {
|
||||
return f(handler);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -68,7 +68,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (!username.is_empty() && !password.is_empty())
|
||||
credentials = HTTP::HttpRequest::BasicAuthenticationCredentials { username, password };
|
||||
|
||||
WebServer::Configuration configuration(real_document_root_path, credentials);
|
||||
// FIXME: This should accept a ByteString for the path instead.
|
||||
WebServer::Configuration configuration(TRY(String::from_byte_string(real_document_root_path)), credentials);
|
||||
|
||||
Core::EventLoop loop;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue