mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
LaunchServer: Use new FileManager flags instead of two arguments
This commit is contained in:
parent
0071742a5a
commit
6c087480cf
1 changed files with 8 additions and 3 deletions
|
@ -299,9 +299,14 @@ bool Launcher::open_file_url(const URL& url)
|
|||
|
||||
// TODO: Make directory opening configurable
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
Vector<String> fm_arguments { url.path() };
|
||||
if (!url.fragment().is_empty())
|
||||
fm_arguments.append(url.fragment());
|
||||
Vector<String> fm_arguments;
|
||||
if (url.fragment().is_empty()) {
|
||||
fm_arguments.append(url.path());
|
||||
} else {
|
||||
fm_arguments.append(String::formatted("{}/{}", url.path(), url.fragment()));
|
||||
fm_arguments.append("-s");
|
||||
fm_arguments.append("-r");
|
||||
}
|
||||
return spawn("/bin/FileManager", fm_arguments);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue