Fwd: [Thunar-dev] Proper way to determine the type of a file more accurate than thunar_file_get_content_type()
Hubert Hesse
xfce at hubertscorner.de
Wed May 11 00:02:29 CEST 2011
Hi list,
sorry to bother you again. Can you give me an answer to my question
whether I can introduce libgmagic to determine the types of files
directly? Or is there a better way to this?
kind regards,
Hubert Hese
-------- Original Message --------
Subject: [Thunar-dev] Proper way to determine the type of a file more
accurate than thunar_file_get_content_type()
Date: Fri, 29 Apr 2011 00:04:19 +0200
From: Hubert Hesse <xfce at hubertscorner.de>
Reply-To: xfce file manager <thunar-dev at xfce.org>
To: Thunar-dev at xfce.org
Hi,
I am working on #2913 "Svg files cause thunar window to freeze".
The problem resulted from a gdk function gdk_pixbuf_get_file_info() in
thunar-list-model.c which works not well on certain svg with embedded
jpg (takes ages to load). Or cause Thunar to crash when clicking on
empty svg like:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<html><body><svg></svg></body></html>
I supplied a patch which fixes the bug as long as the outcome of
thunar_file_get_content_type (file) and respectively
g_file_info_get_content_type() is correct.
However this is not the case on my box. It seems that the result of the
two functions mentioned changes with the file extension.
So renaming the empty svg to svg.jpg makes the patch useless and thunar
crashes again.
Is there a way to determine the type of a file more accurate than
thunar_file_get_content_type()?
E.g. can I introduce libgmagic?
Or would it be a better solution to temporally disable the image size
detection completely until the bug in gdk-pixbuf:
https://bugzilla.gnome.org/show_bug.cgi?id=647803 is fixed?
kind regards,
Hubert Hese
_______________________________________________
Thunar-dev mailing list
Thunar-dev at xfce.org
http://foo-projects.org/mailman/listinfo/thunar-dev
More information about the Xfce4-dev
mailing list