1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 21:27:44 +00: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:
thankyouverycool 2023-06-08 09:18:21 -04:00 committed by Sam Atkins
parent 49b29332f2
commit 9ecfacaffd

View file

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