[Webkit-unassigned] [Bug 31066] [GTK] opening local files on win32
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Nov 7 08:15:21 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31066
--- Comment #8 from Josip <josip at pisoj.com> 2009-11-07 08:15:20 PDT ---
(In reply to comment #7)
> I have little idea from Windows32. In general I would like to see a test case
> for Glib/Gio and then an explanation of why it is failing on windows. Once we
> have that we can decide on a fix?
Not that i know anything about that but maybe valid explanation is on:
http://library.gnome.org/devel/gio/stable/gio-GContentType.html which says:
"""
A content type is a platform specific string that defines the type of a file.
On unix it is a mime type, on win32 it is an extension string like ".doc",
".txt" or a percieved string like "audio". Such strings can be looked up in the
registry at HKEY_CLASSES_ROOT.
"""
Not sure what you mean by test case, is that something for "run-webkit-tests"
or this would do:
///////////////////////////////////////////////////////////////////////////////
/* gio_test */
#include <gio/gio.h>
#include <stdio.h>
int main(int argc, const char * argv[])
{
g_type_init ();
GFile * file = g_file_new_for_commandline_arg (argv[1]);
GError *error = 0;
GFileInfo* info = g_file_query_info (file, "standard::*",
G_FILE_QUERY_INFO_NONE , NULL, NULL);
printf("If GFile is '%s' then from GFileInfo content type is '%s'\n",
g_file_get_basename(file), g_file_info_get_content_type(info));
printf("and from MIME is '%s', ",
g_content_type_from_mime_type(g_file_info_get_content_type(info)));
printf("even if his mime type is '%s'\n",
g_content_type_get_mime_type(g_file_info_get_content_type(info)));
return (0);
}
///////////////////////////////////////////////////////////////////////////////
$ ./gio_test ~/wtest.html
If GFile is 'wtest.html' then from GFileInfo content type is 'text/html'
and from MIME is 'text/html', even if his mime type is 'text/html'
$ wine ./gio_test.exe ~/wtest.html
If GFile is 'wtest.html' then from GFileInfo content type is '.html'
and from MIME is '(null)', even if his mime type is 'text/html'
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list