LibFileSystemAccessClient: Don't crash when formatting error messages

Since c140b67 ESUCCESS Errors aren't allowed. FSAC was initializing
an ErrorOr<String> arbitrarily to 0 for scope, causing it to hit the
VERIFY().
This commit is contained in:
thankyouverycool 2023-06-08 09:18:21 -04:00 committed by Sam Atkins
parent 49b29332f2
commit 9ecfacaffd
Notes: sideshowbarker 2024-07-17 00:23:42 +09:00

View File

@ -131,7 +131,7 @@ void Client::handle_prompt_end(i32 request_id, i32 error, Optional<IPC::File> co
break;
[[fallthrough]];
default:
auto maybe_message = ErrorOr<String>({});
ErrorOr<String> maybe_message = String {};
if (error == ECONNRESET)
maybe_message = String::formatted("FileSystemAccessClient: {}", Error::from_errno(error));
else