summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspeles <speles@mail.ua>2021-03-05 21:44:07 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-07 11:00:36 +0100
commit6c087480cf0b179918bd7b2b8c7d2017553043ad (patch)
tree2d178608da3ad5b7d56f1b38e08d5ffd810e777f
parent0071742a5a2fcb89fee6d438dad4e9125e04bc53 (diff)
downloadserenity-6c087480cf0b179918bd7b2b8c7d2017553043ad.zip
LaunchServer: Use new FileManager flags instead of two arguments
-rw-r--r--Userland/Services/LaunchServer/Launcher.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Userland/Services/LaunchServer/Launcher.cpp b/Userland/Services/LaunchServer/Launcher.cpp
index c763f9bdf7..9c78d8f1f3 100644
--- a/Userland/Services/LaunchServer/Launcher.cpp
+++ b/Userland/Services/LaunchServer/Launcher.cpp
@@ -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);
}