Bug 398031 - shared-mime-info thinks *.doc files are Powerpoint documents
shared-mime-info thinks *.doc files are Powerpoint documents
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: shared-mime-info (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-24 16:01 EST by Jan "Yenya" Kasprzak
Modified: 2008-03-16 15:30 EDT (History)
0 users

See Also:
Fixed In Version: 0.23-1.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-16 15:30:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Jan "Yenya" Kasprzak 2007-11-24 16:01:05 EST
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-24 19:48:14 EST
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 12:21:56 EST
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 06:17:41 EST
Fixed upstream:

2007-12-10  Bastien Nocera  <hadess@hadess.net>

        * 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 15:16:25 EST
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 15:30:32 EDT
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.