[Xfce4-commits] <midori:master> Unify file handling in midori_prepare_uri and magic_uri
Christian Dywan
noreply at xfce.org
Thu Mar 8 01:12:02 CET 2012
Updating branch refs/heads/master
to 537d002a6f939d262aa58dc7659f5a0aa00979b0 (commit)
from f3a5d49434e761d282223ec34e398f5372558b34 (commit)
commit 537d002a6f939d262aa58dc7659f5a0aa00979b0
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Mar 8 00:46:38 2012 +0100
Unify file handling in midori_prepare_uri and magic_uri
midori/main.c | 4 +---
midori/sokoke.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/midori/main.c b/midori/main.c
index deda05f..7345dcb 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1513,9 +1513,7 @@ midori_prepare_uri (const gchar *uri)
{
gchar* uri_ready;
- if (g_path_is_absolute (uri))
- return g_filename_to_uri (uri, NULL, NULL);
- else if (g_str_has_prefix(uri, "javascript:"))
+ if (g_str_has_prefix(uri, "javascript:"))
return NULL;
else if (g_file_test (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
{
diff --git a/midori/sokoke.c b/midori/sokoke.c
index 23a97b1..b25a3dd 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -651,7 +651,7 @@ sokoke_magic_uri (const gchar* uri)
/* Add file:// if we have a local path */
if (g_path_is_absolute (uri))
- return g_strconcat ("file://", uri, NULL);
+ return g_filename_to_uri (uri, NULL, NULL);
/* Parse geo URI geo:48.202778,16.368472;crs=wgs84;u=40 as a location */
if (!strncmp (uri, "geo:", 4))
{
More information about the Xfce4-commits
mailing list