1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibFileSystem+Userland: Return ByteString from real_path()

This commit is contained in:
Sam Atkins 2024-01-15 16:23:24 +00:00 committed by Sam Atkins
parent cdf17efb9a
commit 56c5ffe398
25 changed files with 44 additions and 40 deletions

View file

@ -388,11 +388,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
for (auto& string : wasi_preopened_mappings) {
auto split_index = string.find(':');
if (split_index.has_value()) {
LexicalPath host_path { FileSystem::real_path(string.substring_view(0, *split_index)).release_value_but_fixme_should_propagate_errors().to_byte_string() };
LexicalPath host_path { FileSystem::real_path(string.substring_view(0, *split_index)).release_value_but_fixme_should_propagate_errors() };
LexicalPath mapped_path { string.substring_view(*split_index + 1) };
paths.append({move(host_path), move(mapped_path)});
} else {
LexicalPath host_path { FileSystem::real_path(string).release_value_but_fixme_should_propagate_errors().to_byte_string() };
LexicalPath host_path { FileSystem::real_path(string).release_value_but_fixme_should_propagate_errors() };
LexicalPath mapped_path { string };
paths.append({move(host_path), move(mapped_path)});
}