Bug 56575

Summary: .xlr is a application/vnd.ms-works Spreadsheet
Product: shared-mime-info Reporter: Samuel Mehrbrodt <s.mehrbrodt>
Component: freedesktop.org.xmlAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: caolanm
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch for xlr filetype
don't we want it to be *application/vnd.ms-works*

Description Samuel Mehrbrodt 2012-10-30 08:59:22 UTC
Created attachment 69296 [details] [review]
Patch for xlr filetype

.xlr was detected as 'application/x-ole-storage' and couldn't be assigned to the right application.
It is a MS-Works Spreadsheet file, see https://bugs.freedesktop.org/show_bug.cgi?id=45922 for more details.

Attached is a patch with the filetype and a testcase added.
Comment 1 Bastien Nocera 2012-10-30 09:38:09 UTC
You didn't test that patch though, did you?

test.xlr, 'name' test: expected application/application/vnd.ms-excel, got application/vnd.ms-excel
test.xlr, 'data' test: expected application/application/vnd.ms-excel, got application/x-ole-storage
test.xlr, 'file' test: expected application/application/vnd.ms-excel, got application/vnd.ms-excel
Comment 2 Bastien Nocera 2012-10-30 09:38:53 UTC
Even fixing the tests/list file I get:

test.xlr, 'data' test: expected application/vnd.ms-excel, got application/x-ole-storage
Comment 3 Samuel Mehrbrodt 2012-10-30 09:42:04 UTC
I changed the freedesktop.org.xml on my computer and after update-mime-database, mimetype tells me:
sam@3000-N100:~$ mimetype test.xlr 
test.xlr: application/vnd.ms-excel

I didn't test the test case though.
Comment 4 Samuel Mehrbrodt 2012-10-30 09:43:31 UTC
application/x-ole-storage is what it was before my changes.
Comment 5 Bastien Nocera 2012-10-30 09:52:30 UTC
(In reply to comment #3)
> I changed the freedesktop.org.xml on my computer and after
> update-mime-database, mimetype tells me:
> sam@3000-N100:~$ mimetype test.xlr 
> test.xlr: application/vnd.ms-excel
> 
> I didn't test the test case though.

Except that god knows what vendor patches your database has. Check the HACKING file on how to setup the test suite.
Comment 6 Caolán McNamara 2012-10-30 12:28:04 UTC
Created attachment 69301 [details] [review]
don't we want it to be *application/vnd.ms-works*

Don't we want this to be detected as application/vnd.ms-works rather than as excel. i.e. like this rework
Comment 7 Samuel Mehrbrodt 2012-10-30 14:57:17 UTC
How does LibreOffice then know that it should be opened with Calc?
Comment 8 Caolán McNamara 2012-10-30 16:22:55 UTC
ms-works filter apparently just outputs a writer or calc document depending on whether its a wps or xlr and libreoffice just "does the right thing"
Comment 9 Samuel Mehrbrodt 2012-10-30 16:52:53 UTC
Ok, thanks for helping out.
Did you test the new patch?
Comment 10 Caolán McNamara 2012-10-31 15:54:39 UTC
yeah, works for me (tm)
Comment 11 Bastien Nocera 2012-10-31 16:06:40 UTC
commit d3122c4234eff7dcf8fbbd6c8ae91a7c3203f17d
Author: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Date:   Tue Oct 30 09:54:38 2012 +0100

    Added xlr filetype
    
    https://bugs.freedesktop.org/show_bug.cgi?id=56575

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.