summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-09 16:14:56 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-09 16:14:56 +0200
commit427863f2750f07b31f97f84bbb36a58e3fc4269c (patch)
tree224c6074a928feb8b80951de7b30ef47fb1bda88
parent15601988a4b32e6ed4812dc7c7a423a2ebe361a2 (diff)
downloadserenity-427863f2750f07b31f97f84bbb36a58e3fc4269c.zip
LibDesktop: Don't resolve relative URL's, expect absolute URLs instead
It's not our job in LibDesktop to resolve relative URLs on behalf of callers, so let's just not do that. :^)
-rw-r--r--Libraries/LibDesktop/Launcher.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/Libraries/LibDesktop/Launcher.cpp b/Libraries/LibDesktop/Launcher.cpp
index 959af2a212..74887b86ed 100644
--- a/Libraries/LibDesktop/Launcher.cpp
+++ b/Libraries/LibDesktop/Launcher.cpp
@@ -47,7 +47,6 @@ private:
LaunchServerConnection()
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
{
-
}
virtual void handle(const Messages::LaunchClient::Dummy&) override {}
};
@@ -55,18 +54,6 @@ private:
bool Launcher::open(const URL& url)
{
auto connection = LaunchServerConnection::construct();
-
- if (url.protocol() == "file") {
- // Make the path fully qualified - LaunchServer won't know our cwd
- char* path = realpath(url.path().characters(), nullptr);
- if (path == nullptr) {
- return false;
- }
- auto fully_qualified = URL::create_with_file_protocol(path);
- free(path);
-
- return connection->send_sync<Messages::LaunchServer::OpenUrl>(fully_qualified.to_string());
- }
return connection->send_sync<Messages::LaunchServer::OpenUrl>(url.to_string());
}