Bug 398031 - shared-mime-info thinks *.doc files are Powerpoint documents
Summary: shared-mime-info thinks *.doc files are Powerpoint documents
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: shared-mime-info
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-24 21:01 UTC by Jan "Yenya" Kasprzak
Modified: 2008-03-16 19:30 UTC (History)
0 users

Fixed In Version: 0.23-1.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-16 19:30:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
The sample doc file (19.50 KB, application/msword)
2007-11-26 17:21 UTC, Jan "Yenya" Kasprzak
no flags Details

Description Jan "Yenya" Kasprzak 2007-11-24 21:01:05 UTC
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):
shared-mime-info-0.22-3.fc8

How reproducible:
100%

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"'
  
Actual results:
file(1) detects the contents correctly as application/msword, while Perl prints
application/vnd.ms-powerpoint instead.

Expected results:
application/msword for both cases.

Additional info:
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.

Comment 1 Bastien Nocera 2007-11-25 00:48:14 UTC
Could you please attach the file you created? "Save a doc file" is a bit too
vague...

Comment 2 Jan "Yenya" Kasprzak 2007-11-26 17:21:56 UTC
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
shared-mime-info).

Comment 3 Bastien Nocera 2007-12-10 11:17:41 UTC
Fixed upstream:

2007-12-10  Bastien Nocera  <hadess>

        * freedesktop.org.xml.in:
        * tests/list:
        * tests/office.doc: 
        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
        testsuite
        From https://bugzilla.redhat.com/show_bug.cgi?id=398031


Comment 4 Fedora Update System 2007-12-20 20:16:25 UTC
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'

Comment 5 Fedora Update System 2008-03-16 19:30:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.