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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-17 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [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 <haraken@chromium.org>
[V8][Refactoring] Remove V8Proxy::deletionNotHandledByInterceptor()
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());
}