Summary: | Shared-mime-info 1.9-1 - all .iso files are recognized as stl-binary. Breaks file association. KDE Plasma, Arch Linux | ||
---|---|---|---|
Product: | shared-mime-info | Reporter: | mo78 |
Component: | general | Assignee: | Shared Mime Info group <shared_mime_info> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | faure |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Mafia III screenshots
kioclient5 openProperties |
Description
mo78
2018-05-01 09:13:17 UTC
Excuse me to not mention - shared-mime-info 1.9-1. Reverting to 1.6-1 solves the problem. Anybody? This is a serious problem. One cannot assign application associations to this type of files. (In reply to mo78 from comment #0) > All .iso are recognized as stl-binary. BIOS files and .GHO images too. > Breaks file association. KDE Plasma, Arch Linux. Obviously not all, as there are ISO images in the test suite, and they're detected correctly. I don't have enough information here to replicate the problem. Please make the first few megabytes of a couple of problematic files available. (In reply to mo78 from comment #2) > Anybody? This is a serious problem. One cannot assign application > associations to this type of files. You've listed a work-around in comment 1. If you need urgent fixes, there are a number of companies that will do that for you for a fee. I don't know how to do that but all of my .iso files are recognized as stl-binary and I have many of them - over 400. https://s9.postimg.cc/6kxqe1b6n/Screenshot_20180509_133327.png As you can see the icon is missing and the file association is broken. https://s9.postimg.cc/55w5pdf9b/image.png (In reply to mo78 from comment #4) > I don't know how to do that but all of my .iso files are recognized as > stl-binary and I have many of them - over 400. > > https://s9.postimg.cc/6kxqe1b6n/Screenshot_20180509_133327.png > > As you can see the icon is missing and the file association is broken. > > https://s9.postimg.cc/55w5pdf9b/image.png All the ISOs appear fine in GNOME, so it's likely a bug in KDE. David? Works fine for me too with Qt/KDE code, I suspect this is rather interference from another mimetypes package file on your system. What does this command return? grep '\*\.iso' /usr/share/mime/packages/* Also grep for stl-binary... it shows up in /usr/share/mime/packages/freedesktop.org.xml for me, but that's not associated to the *.iso extension. Also, what does `kmimetypefinder5 file.iso` say? (with and without the -f option) (The image links don't work for me). Created attachment 139504 [details]
Mafia III screenshots
The links with the pictures are working fine but I made an attachment for you, I just mistyped the name of the attachment for I recently filed a bug about Mafia III game. I'm sorry for that :) Here you are what you ask: grep '\*\.iso' /usr/share/mime/packages/* /usr/share/mime/packages/freedesktop.org.xml: <glob weight="80" pattern="*.iso"/> /usr/share/mime/packages/freedesktop.org.xml: <glob pattern="*.iso9660"/> /usr/share/mime/packages/freedesktop.org.xml: <glob pattern="*.iso"/> /usr/share/mime/packages/freedesktop.org.xml: <glob pattern="*.iso"/> /usr/share/mime/packages/freedesktop.org.xml: <glob pattern="*.iso"/> /usr/share/mime/packages/freedesktop.org.xml: <glob pattern="*.iso"/> grep '\*\.stl-binary' /usr/share/mime/packages/* says nothing. kmimetypefinder5 file.iso gives: application/x-cd-image And kmimetypefinder5 file.iso -f: application/x-cd-image So kmimetypefinder5 shows that the Qt is able to detect the mimetype just fine. But do try it on the same .iso file you're opening in the properties dialog, to be sure: kmimetypefinder5 "Car Mechanic Simulator 2015.iso" Also try kioclient5 openProperties "Car Mechanic Simulator 2015.iso" to see if it shows anything different. For me (with tests/iso-file.iso from shared-mime-info sources) it does show "raw CD image" correctly in the properties dialog. In any case this is starting to sound like material for a KDE bug report rather than a shared-mime-info bug report. Thank you :) Where we go: kmimetypefinder5 "Car Mechanic Simulator 2015.iso" model/x.stl-binary For kioclient5 openProperties "Car Mechanic Simulator 2015.iso" I made an attachment. Thank you once again :) Created attachment 139547 [details]
kioclient5 openProperties
*Here we go: OK I see what's happening. freedesktop.org.xml has the *.iso glob for multiple mimetypes: application/x-cd-image:*.iso application/x-sega-cd-rom:*.iso application/x-saturn-rom:*.iso application/x-wii-rom:*.iso application/x-gamecube-rom:*.iso Therefore we have to look at the contents of the file, and for some reason this particular file matches the magic rules for stl-binary. stl-binary doesn't inherit from any of the candidates above, so that doesn't help choosing one, so we stick to stl-binary. One issue might be that my implementation in Qt stops at the first magic match, no matter the accuracy number associated to it. But, hmm, x-cd-image has no magic rules at all, so there's no chance for it to win that fight. Does anyone know if we can come up with magic rules for x-cd-image? Excuse me if I don't understand you right but almost all .iso files are recognized as stl-binary, not only this one, including . GHO and BIOS settings files. If I download Linux Mint 18.3 original .iso for example, it is treated as Apple Disk Image: http://i65.tinypic.com/jfgbgh.png But the big part of .isos are recognized as stl-binary. Here you are .GHO: http://i67.tinypic.com/2j4cy9x.png Original AOMEI Pro Bootable CD: http://i68.tinypic.com/n5off7.png Original Norton Ghost Bootable ISO: http://i66.tinypic.com/iqd6hu.png And BIOS saved settings file: http://i68.tinypic.com/a4bgwp.png And so on. Do you see the screenshots? (In reply to David Faure from comment #15) > OK I see what's happening. > > freedesktop.org.xml has the *.iso glob for multiple mimetypes: > application/x-cd-image:*.iso > application/x-sega-cd-rom:*.iso > application/x-saturn-rom:*.iso > application/x-wii-rom:*.iso > application/x-gamecube-rom:*.iso > > Therefore we have to look at the contents of the file, and for some reason > this particular file matches the magic rules for stl-binary. > stl-binary doesn't inherit from any of the candidates above, so that doesn't > help choosing one, so we stick to stl-binary. > > One issue might be that my implementation in Qt stops at the first magic > match, no matter the accuracy number associated to it. > > But, hmm, x-cd-image has no magic rules at all, so there's no chance for it > to win that fight. > > Does anyone know if we can come up with magic rules for x-cd-image? 1591 <!-- No magic, see https://bugs.freedesktop.org/show_bug.cgi?id=10049 -->• I'd start by adding a problematic ISO to the test suite. (In reply to mo78 from comment #16) > Excuse me if I don't understand you right but almost all .iso files are > recognized as stl-binary, not only this one, including . GHO and BIOS > settings files. Can you give me the URL of the smallest iso file you can find that is misdetected? Thanks. Here you are, it's just 3.2 MB: https://mega.nz/#!DcgjiYbJ!fFUL2YwgyTqdYXlLGr6kM4qrx-8QGM9G2k_c6_6YcAg Thank you :) Hello, is there any progress on this? The status is "needinfo". What additional info can I provide to you? commit 7c7f84e2a77f4142cf77ebdf239deaa14c842f9c Author: Bastien Nocera <hadess@hadess.net> Date: Mon Jun 4 13:25:30 2018 +0200 Remove magic from STL binary 3-NUL bytes aren't enough to be sure that this will only ever match STL binary headers. https://bugs.freedesktop.org/show_bug.cgi?id=106330 commit 1e6b421a6c8c2dce3e430a4e2b963a9efd369aa2 Author: Bastien Nocera <hadess@hadess.net> Date: Mon Jun 4 13:23:29 2018 +0200 Add test for bug 106330 The first 32k of an ISO file. |
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.