Created attachment 23275 [details] menu.ini - an ini configuration file for testing. x-cisco-vpn-settings mimetype was added after this request: http://bugs.freedesktop.org/show_bug.cgi?id=3560 Original report at Ubuntu/Launchpad: https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/334126 $ apt-cache policy shared-mime-info shared-mime-info: Installed: 0.51-0ubuntu1 Candidate: 0.51-0ubuntu1 Version table: *** 0.51-0ubuntu1 0 500 http://archive.ubuntu.com jaunty/main Packages 100 /var/lib/dpkg/status $ mimetype -a *.ini exit.ini: application/x-cisco-vpn-settings exit.ini: text/plain firewall.ini: application/x-cisco-vpn-settings firewall.ini: text/plain menu.ini: application/x-cisco-vpn-settings menu.ini: text/plain All of these are normal .ini configuration files. However, ubuntu (gnome) detects them as application/x-cisco-vpn-settings files. This is the part for /usr/share/mime/packages/freedesktop.org.xml: <mime-type type="application/x-cisco-vpn-settings"> <comment>Cisco VPN Settings</comment> <comment xml:lang="be@latin">Nałady Cisco VPN</comment> <comment xml:lang="ca">paràmetres VPN de Cisco</comment> <comment xml:lang="cs">Nastavení Cisco VPN</comment> <comment xml:lang="es">Ajustes VPN de Cisco</comment> <comment xml:lang="fi">Cisco VPN -asetukset</comment> <comment xml:lang="fr">paramètres VPN Cisco</comment> <comment xml:lang="ga">socruithe VPN Cisco</comment> <comment xml:lang="hu">Cisco VPN beállítások</comment> <comment xml:lang="id">Penataan Cisco VPN</comment> <comment xml:lang="it">Impostazioni VPN Cisco</comment> <comment xml:lang="ko">Cisco VPN 설정</comment> <comment xml:lang="lt">Cisco VPN parametrai</comment> <comment xml:lang="nb">Cisco VPN-innstillinger</comment> <comment xml:lang="nl">Cisco VPN-instellingen</comment> <comment xml:lang="pt_BR">Configurações de VPN da Cisco</comment> <comment xml:lang="sv">Cisco VPN-inställningar</comment> <comment xml:lang="vi">Thiết lập VPN Cisco</comment> <generic-icon name="text-x-generic"/> <magic priority="50"> <match value="[main]" type="string" offset="0"/> </magic> <glob pattern="*.pcf"/> </mime-type> I think there should not be a priority for the "[main]" text string on top of the file, but to look for the .pcf file extension first.
(In reply to comment #0) <snip> > I think there should not be a priority for the "[main]" text string on top of > the file, but to look for the .pcf file extension first. You can't do that, it wouldn't match what the shared-mime-info spec allows. Fixed it another way anyway: * freedesktop.org.xml.in: Avoid some .ini files getting detected as Cisco VPN configuration files, when they start with "[main]" (Closes: #20302) * tests/list: * tests/menu.ini: Add test case to verify the above
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.