From 076217013f1ce9d3c7f1759f7923e1a3da7853d7 Mon Sep 17 00:00:00 2001 From: Peter Hofmann Date: Sat, 11 Mar 2017 17:32:22 +0100 Subject: Call ensure_uri_scheme() before sending message to socket The main process and the process that sends the message might have different working directories. As a result, the main process might not be able to detect "foo.html" as a file when called as "lariza foo.html". --- browser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'browser.c') diff --git a/browser.c b/browser.c index a4391dc..112c698 100644 --- a/browser.c +++ b/browser.c @@ -121,8 +121,10 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show) if (uri != NULL && cooperative_instances && !cooperative_alone) { - write(cooperative_pipe_fp, uri, strlen(uri)); + f = ensure_uri_scheme(uri); + write(cooperative_pipe_fp, f, strlen(f)); write(cooperative_pipe_fp, "\n", 1); + g_free(f); return NULL; } -- cgit v1.2.3