diff options
author | Peter Hofmann <scm@uninformativ.de> | 2017-03-11 17:32:22 +0100 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2017-03-11 17:32:22 +0100 |
commit | 076217013f1ce9d3c7f1759f7923e1a3da7853d7 (patch) | |
tree | 45e2781b915ad1c8204baf1acc1b6e9c30440ed0 | |
parent | 5f3aff7043224f9d0432c2f412810c95ddd5536a (diff) | |
download | lariza-076217013f1ce9d3c7f1759f7923e1a3da7853d7.tar.gz |
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".
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | browser.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,10 @@ Release history for lariza +next + [Fixed] + - Automatically adding the "file://" prefix didn't work (reliably) if + a message was sent to an already running instance. + v17.02 2017-02-16 [Fixed] - As requested by WebKit's API documentation, we now wait for the @@ -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; } |