Unify file handling in midori_prepare_uri and magic_uri
This commit is contained in:
parent
f3a5d49434
commit
537d002a6f
2 changed files with 2 additions and 4 deletions
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue