1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LaunchServer: Fix argument order to FileManager

Correct the order we pass the arguments to the FileManager so
opening file:// URLs works.

The path is a positional argument that was passed after the flags.
We need to make sure the flags are passed before positional arguments.
This commit is contained in:
Albert S 2021-04-24 17:35:27 +02:00 committed by Linus Groh
parent 157cd7c819
commit 89a9d8f45c

View file

@ -283,9 +283,9 @@ bool Launcher::open_file_url(const URL& url)
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");
fm_arguments.append(String::formatted("{}/{}", url.path(), url.fragment()));
}
return spawn("/bin/FileManager", fm_arguments);
}