Red Hat Bugzilla – Bug 398031
shared-mime-info thinks *.doc files are Powerpoint documents
Last modified: 2008-03-16 15:30:34 EDT
Description of problem:
After upgrading to F8 the detection of MIME types using shared-mime-info (and
perl-File-MimeInfo) does not work as expected anymore. All MS Office documents
are detected as Powerpoint.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install perl-File-MimeInfo package
2. save a MS-Word document as (say) /tmp/aaa (do not use any file extension so
that the extension-based heuristics of perl-File-MimeInfo do not trigger).
3. $ file -i /tmp/aaa
4. $ perl -MFile::MimeInfo::Magic -e 'print mimetype("/tmp/aaa"), "\n"'
file(1) detects the contents correctly as application/msword, while Perl prints
application/msword for both cases.
After downgrade to shared-mime-info-0.20-2.fc7, Perl prints
"application/x-ole-storage", which I consider better than what F8 does, because
it at least tells me "try to use some heuristics based on the file name
instead". This downgrade also tells me that the problem is in shared-mime-info,
not in perl-File-MimeInfo.
Could you please attach the file you created? "Save a doc file" is a bit too
Created attachment 269071 [details]
The sample doc file
Attached a doc file (altough I have seen at least 5000 different files in my
system mis-detected as powerpoint, before I have discovered that it is a bug in
2007-12-10 Bastien Nocera <firstname.lastname@example.org>
Remove the magic from the Powerpoint files,
it's actually magic for "Microsoft Office document"
and add it to x-ole-storage, add a test file to the
shared-mime-info-0.23-1.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update shared-mime-info'
shared-mime-info-0.23-1.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.