Bug 27766 - treemagic for x-content/image-picturecd too general
Summary: treemagic for x-content/image-picturecd too general
Status: RESOLVED INVALID
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 20:53 UTC by Charles
Modified: 2010-04-21 02:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Charles 2010-04-20 20:53:46 UTC
The current trigger for x-content/image-picturecd is too general - having a non empty folder named PICTURES. There is no device type check, so internal disks, portable usb devices etc are all labelled incongruously as begin a picture cd (eg by nautilus). See downstream bug - https://bugs.launchpad.net/nautilus/+bug/258936.

Especially on case-insensitive filesystems, its not uncommon to have a directory named Pictures, and this still triggers the match.

The offending line in the mime files:

$ grep -A 39 x-content/image-picturecd /usr/share/mime/packages/freedesktop.org.xml | grep -v xml:lang
  <mime-type type="x-content/image-picturecd">
    <comment>Picture CD</comment>
    <treemagic>
      <treematch type="directory" path="PICTURES" non-empty="true" match-case="true"/>
    </treemagic>
  </mime-type>

Ideally this should be enhanced to also include a device type check, or alternatively just removed.

See resulting effect on gvfs ([drive-hardisk] considered a x-content/image-picturecd):

$ gvfs-mount -li | grep -A 15 'Volume(1)'
  Volume(1): Files
    Type: GProxyVolume (GProxyVolumeMonitorGdu)
    ids:
     uuid: '62b4128d-3edc-4dd5-b0d8-7134845d31d1'
     unix-device: '/dev/sda6'
     label: 'Files'
    themed icons: [drive-harddisk-ata] [drive-harddisk] [drive]
    can_mount=1
    can_eject=0
    should_automount=0
    Mount(0): Files -> file:///media/Files
      Type: GProxyMount (GProxyVolumeMonitorGdu)
      default_location=file:///media/Files
      themed icons: [drive-harddisk-ata] [drive-harddisk] [drive]
      x_content_types: x-content/image-picturecd
      can_unmount=1
Comment 1 Bastien Nocera 2010-04-21 02:52:19 UTC
If checks need to be made based on media type, then it would be in gvfs. There's nothing that shared-mime-info can do about that.


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.