mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
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:
parent
49b29332f2
commit
9ecfacaffd
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/9ecfacaffd Pull-request: https://github.com/SerenityOS/serenity/pull/19318 Reviewed-by: https://github.com/LucasChollet
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user