Title: [117549] trunk/Source/WebCore
Revision
117549
Author
[email protected]
Date
2012-05-17 23:32:36 -0700 (Thu, 17 May 2012)

Log Message

[GTK] KURL::fileSystemPath() should strip the query of the uri
https://bugs.webkit.org/show_bug.cgi?id=86721

Reviewed by Martin Robinson.

* platform/gtk/KURLGtk.cpp:
(WebCore::KURL::fileSystemPath): Use the already parsed path to
create the GFile instead of the whole URL string. The parsed path
doesn't include neither the fragment (#) nor the query (?) parts.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (117548 => 117549)


--- trunk/Source/WebCore/ChangeLog	2012-05-18 06:29:59 UTC (rev 117548)
+++ trunk/Source/WebCore/ChangeLog	2012-05-18 06:32:36 UTC (rev 117549)
@@ -1,3 +1,15 @@
+2012-05-17  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] KURL::fileSystemPath() should strip the query of the uri
+        https://bugs.webkit.org/show_bug.cgi?id=86721
+
+        Reviewed by Martin Robinson.
+
+        * platform/gtk/KURLGtk.cpp:
+        (WebCore::KURL::fileSystemPath): Use the already parsed path to
+        create the GFile instead of the whole URL string. The parsed path
+        doesn't include neither the fragment (#) nor the query (?) parts.
+
 2012-05-17  Kentaro Hara  <[email protected]>
 
         [V8][Refactoring] Remove V8Proxy::deletionNotHandledByInterceptor()

Modified: trunk/Source/WebCore/platform/gtk/KURLGtk.cpp (117548 => 117549)


--- trunk/Source/WebCore/platform/gtk/KURLGtk.cpp	2012-05-18 06:29:59 UTC (rev 117548)
+++ trunk/Source/WebCore/platform/gtk/KURLGtk.cpp	2012-05-18 06:32:36 UTC (rev 117549)
@@ -31,7 +31,10 @@
 
 String KURL::fileSystemPath() const
 {
-    GRefPtr<GFile> file = adoptGRef(g_file_new_for_uri(m_string.utf8().data()));
+    if (!isValid() || !isLocalFile())
+        return String();
+
+    GRefPtr<GFile> file = adoptGRef(g_file_new_for_path(path().utf8().data()));
     GOwnPtr<char> filename(g_file_get_path(file.get()));
     return filenameToString(filename.get());
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to