mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
TextEditor: Replace DeprecatedString for String
This commit is contained in:
parent
a24c49c18c
commit
97398eb568
3 changed files with 21 additions and 17 deletions
|
@ -72,12 +72,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
if (file_to_edit) {
|
||||
FileArgument parsed_argument(file_to_edit);
|
||||
auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, parsed_argument.filename());
|
||||
auto filename = TRY(String::from_utf8(StringView(file_to_edit, strlen(file_to_edit))));
|
||||
FileArgument parsed_argument(filename);
|
||||
auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, parsed_argument.filename().to_deprecated_string());
|
||||
|
||||
if (response.is_error()) {
|
||||
if (response.error().code() == ENOENT)
|
||||
text_widget->open_nonexistent_file(parsed_argument.filename());
|
||||
text_widget->open_nonexistent_file(parsed_argument.filename().to_deprecated_string());
|
||||
else
|
||||
return 1;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue