1
Fork 0
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:
speles 2021-03-05 21:44:07 +02:00 committed by Andreas Kling
parent 0071742a5a
commit 6c087480cf

View file

@ -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);
}