mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
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. :^)
This commit is contained in:
parent
15601988a4
commit
427863f275
Notes:
sideshowbarker
2024-07-19 06:48:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/427863f2750
1 changed files with 0 additions and 13 deletions
|
@ -47,7 +47,6 @@ private:
|
||||||
LaunchServerConnection()
|
LaunchServerConnection()
|
||||||
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
|
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
virtual void handle(const Messages::LaunchClient::Dummy&) override {}
|
virtual void handle(const Messages::LaunchClient::Dummy&) override {}
|
||||||
};
|
};
|
||||||
|
@ -55,18 +54,6 @@ private:
|
||||||
bool Launcher::open(const URL& url)
|
bool Launcher::open(const URL& url)
|
||||||
{
|
{
|
||||||
auto connection = LaunchServerConnection::construct();
|
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());
|
return connection->send_sync<Messages::LaunchServer::OpenUrl>(url.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue