GNOME Bugzilla – Bug 55461
gnome_mime_type_of_file() returns bogus result for pdf files.
Last modified: 2003-02-09 03:32:54 UTC
Package: balsa Severity: grave Version: 1.1.5 Synopsis: Sending mail with an attachment. Balsa crashes Class: sw-bug C compiler: 2.8.1 glib: 1.2.8 GTK+: 1.2.8 ORBit: ORBit 0.5.2 gnome-libs: gnome-libs 1.2.11 libxml: 1.8.10 gnome-print: gnome-print-0.25 gnome-core: gnome-core 1.2.4 Description: Sending mail with an attachment. Balsa crashes ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-05-30 04:32 ------- Unknown version 1.1.x in product balsa. Setting version to the default, "unspecified". The original reporter (scott.bain@mclaren.co.uk) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, pawsa@theochem.kth.se.
1. I assume the crash can be reproduced? 2. Could you please attach this troublesome file to this report? 2. If not, can you provide the stack trace?
Created attachment 587 [details] The attached file, when balsa crashed
Pawel Ive tried a couple of other file attachments and the same thing has happened. I will try to investigate further
If I attach a file of a different file type ie .ZIP then its OK. PDF's that arrive are OK and show (appplication PDF) If that file is attached in a compose window then the icon becomes very small, and the mime ID is now (PDF document) Ive reloaded balsa 1.1.4 and that is OK. The problem only shows up with 1.1.5 FYI Config line was: ./configure --disable-flock --enable-fcntl --disable-more-warnings --enable-threads --prefix=/opt/gnome --with-esmtp=no
OK, this is almost certainly bug in gnome-libs package, ro exactly in /etc/mime-magic. I attach a program that calls several gnome-mime functions that can be used for testing detected MIME type. Only gnome_mime_type recognizes correctly PDF files as application/pdf. Other functions return "PDF document" as MIME type which is illustrative but incorrect. We cannot do much in balsa except for checking if the returned mime type contains slash character but this is a workaround, not the solution.
Created attachment 588 [details] check-mime.c
I have noticed it is connected with the bug #54690 filed previously for gnome-libs. Having examined /etc/mime-magic I conclude that the set of corrupted entries there is substantial. What is the preferred route for balsa in this case?
my bad sorry for the spam
Is this still a problem?
Not quite. We have a workaround for it and we slowly migrate to gnome-vfs (altough I have already got feedback that we should not push this migration due to gnome-vfs portability problems). If you ask whether the bug still exists, the answer is: yes (as of gnome-libs-1.2.13).
So, is mime-magic still full of corrupted entries? Should this be fixed in 1.4.x? Is it still this way in 2.0.x?
I do not know generally, but we (balsa) use gnome-vfs for mime-type discovery with gnome-2.0.x and it (gnome-vfs) does not have this problem.
Reassigning to the right maintainer alias.
I think this is just a plain bug. Changing the text to 0 string %PDF- application/pdf in mime-magic is probably the right fix. I wonder if we should just copy magic.mime from file(1) since it's been fixed there in newer releases too...
It actually is *the* fix. I did that and it worked perfectly.
*** Bug 54690 has been marked as a duplicate of this bug. ***
Because of the release of GNOME2.0 and 2.2, and the apparent lack of interest in a further release of GNOME 1.4, many GNOME1.4 bugs are being closed. If you feel your bug was incorrectly labeled as a GNOME1.4 bug, or also applied to GNOME2, please reopen it and reassign it to another component more relevant to GNOME2. Thanks, and hope you enjoy GNOME2.