]> spindle.queued.net Git - midori/commitdiff
Check stricly for relative path in midori_prepare_uri
authorPaweł Forysiuk <tuxator@o2.pl>
Sun, 25 Mar 2012 15:47:51 +0000 (17:47 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 25 Mar 2012 16:10:26 +0000 (18:10 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/963899
midori/main.c

index d6f5f4eed3c158e937f9a49e3e2274f7608a1a18..65fc20598b350a246ec8c7ae799eddcb27ad1341 100644 (file)
@@ -1515,7 +1515,8 @@ midori_prepare_uri (const gchar *uri)
 
     if (g_str_has_prefix(uri, "javascript:"))
         return NULL;
-    else if (g_file_test (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+    else if (g_file_test (uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)
+         && !g_path_is_absolute (uri))
     {
         gchar* current_dir = g_get_current_dir ();
         uri_ready = g_strconcat ("file://", current_dir,