Skip to content

Commit

Permalink
LaunchServer: Use new FileManager flags instead of two arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
speles authored and awesomekling committed Mar 7, 2021
1 parent 0071742 commit 6c08748
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Userland/Services/LaunchServer/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6c08748

Please sign in to comment.