mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibDesktop: Pass an optional arguments list to AppFile::spawn()
This commit is contained in:
parent
baaf97787b
commit
3b446fba34
2 changed files with 3 additions and 3 deletions
|
@ -150,12 +150,12 @@ Vector<DeprecatedString> AppFile::launcher_protocols() const
|
||||||
return protocols;
|
return protocols;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppFile::spawn() const
|
bool AppFile::spawn(ReadonlySpan<StringView> arguments) const
|
||||||
{
|
{
|
||||||
if (!is_valid())
|
if (!is_valid())
|
||||||
return false;
|
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())
|
if (pid.is_error())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
Vector<DeprecatedString> launcher_mime_types() const;
|
Vector<DeprecatedString> launcher_mime_types() const;
|
||||||
Vector<DeprecatedString> launcher_file_types() const;
|
Vector<DeprecatedString> launcher_file_types() const;
|
||||||
Vector<DeprecatedString> launcher_protocols() const;
|
Vector<DeprecatedString> launcher_protocols() const;
|
||||||
bool spawn() const;
|
bool spawn(ReadonlySpan<StringView> arguments = {}) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit AppFile(StringView path);
|
explicit AppFile(StringView path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue