mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 06:02:07 +03:00
LibDesktop: Pass an optional arguments list to AppFile::spawn()
This commit is contained in:
parent
baaf97787b
commit
3b446fba34
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/3b446fba34 Pull-request: https://github.com/SerenityOS/serenity/pull/17114 Reviewed-by: https://github.com/AtkinsSJ ✅
@ -150,12 +150,12 @@ Vector<DeprecatedString> AppFile::launcher_protocols() const
|
||||
return protocols;
|
||||
}
|
||||
|
||||
bool AppFile::spawn() const
|
||||
bool AppFile::spawn(ReadonlySpan<StringView> arguments) const
|
||||
{
|
||||
if (!is_valid())
|
||||
return false;
|
||||
|
||||
auto pid = Core::Process::spawn(executable(), ReadonlySpan<StringView> {}, working_directory());
|
||||
auto pid = Core::Process::spawn(executable(), arguments, working_directory());
|
||||
if (pid.is_error())
|
||||
return false;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
Vector<DeprecatedString> launcher_mime_types() const;
|
||||
Vector<DeprecatedString> launcher_file_types() const;
|
||||
Vector<DeprecatedString> launcher_protocols() const;
|
||||
bool spawn() const;
|
||||
bool spawn(ReadonlySpan<StringView> arguments = {}) const;
|
||||
|
||||
private:
|
||||
explicit AppFile(StringView path);
|
||||
|
Loading…
Reference in New Issue
Block a user