mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 03:26:10 +00:00
LaunchServer: Use new FileManager flags instead of two arguments
This commit is contained in:
parent
0071742a5a
commit
6c087480cf
Notes:
sideshowbarker
2024-07-18 21:39:14 +09:00
Author: https://github.com/speles
Commit: 6c087480cf
Pull-request: https://github.com/SerenityOS/serenity/pull/5595
Issue: https://github.com/SerenityOS/serenity/issues/5586
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
|
// TODO: Make directory opening configurable
|
||||||
if (S_ISDIR(st.st_mode)) {
|
if (S_ISDIR(st.st_mode)) {
|
||||||
Vector<String> fm_arguments { url.path() };
|
Vector<String> fm_arguments;
|
||||||
if (!url.fragment().is_empty())
|
if (url.fragment().is_empty()) {
|
||||||
fm_arguments.append(url.fragment());
|
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);
|
return spawn("/bin/FileManager", fm_arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue