X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=libdocument%2Fev-file-helpers.c;h=87fd351ca49e309d884c199c67fc303a412a426a;hb=7d59434cbd7ea6bdd42a6f3223a47cbb06ba4069;hp=01bf089ef4910447df92859c7d00499de7d0a0ea;hpb=11dcf8651d69fa30561d027020a46ced6f851575;p=evince.git diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 01bf089e..87fd351c 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 */ } /**