Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2009-12-21 11:31:24 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-12-22 16:22:29 (GMT)
commite8587a401d8fe01cdc60b2b9fb88b14750c46a2e (patch)
treed0ab99cd266b29fdb6da0a7e1e3c5049d828098f /libdocument
parente732e45fbf5930d8c3ac2471ff8912f41152ec7a (diff)
[windows] Do not use g_content_type_guess() on Windows
At the moment, the g_content_type_guess() implementation in glib for Windows is too limited to be useful.
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-file-helpers.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 01bf089..87fd351 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -438,6 +438,7 @@ get_mime_type_from_uri (const gchar *uri, GError **error)
static gchar *
get_mime_type_from_data (const gchar *uri, GError **error)
{
+#ifndef G_OS_WIN32
GFile *file;
GFileInputStream *input_stream;
gssize size_read;
@@ -477,6 +478,13 @@ get_mime_type_from_data (const gchar *uri, GError **error)
mime_type = g_content_type_get_mime_type (content_type);
g_free (content_type);
return mime_type;
+#else
+ /*
+ * On Windows, the implementation of g_content_type_guess() is too limited at the moment, so we do not
+ * use it and fall back to get_mime_type_from_uri()
+ */
+ return get_mime_type_from_uri (uri, error);
+#endif /* G_OS_WIN32 */
}
/**