After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597805 - x-content-type not set
x-content-type not set
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: afc backend and volume monitor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-08 13:43 UTC by David Zeuthen (not reading bugmail)
Modified: 2009-11-09 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[afc] Add x-content types for AFC backend (1.48 KB, patch)
2009-11-06 00:49 UTC, Bastien Nocera
committed Details | Review

Description David Zeuthen (not reading bugmail) 2009-10-08 13:43:18 UTC
The iPhone has a DCIM/ folder so we should return x-content/image-dcf as the x-content-type to get the right user experience - e.g. autorun working.

Unfortunately this isn't very easy for GVfs backends (or rather, it's a hack how this is done) - but you can play the same games as the gphoto2 backend does for now.
Comment 1 Martin Szulecki 2009-11-01 18:28:06 UTC
So basically if the DCIM/ folder exists, g_vfs_backend_set_x_content_types() should simply set "x-content/image-dcf" for the backend?

Perhaps you mean to set the content type only on the DCIM folder in the related GFileInfo usign g_file_info_set_content_type()?
Comment 2 Bastien Nocera 2009-11-02 11:52:44 UTC
No, the content-type should be set on the mount, using g_vfs_backend_set_x_content_types() in the backend.

But this shouldn't be required, as the front-ends should be able to do it.
Comment 3 Bastien Nocera 2009-11-06 00:49:50 UTC
Created attachment 147067 [details] [review]
[afc] Add x-content types for AFC backend
Comment 4 David Zeuthen (not reading bugmail) 2009-11-09 15:59:02 UTC
Works great here

Volume(1): David Zeuthen’s iPhone
  Type: GProxyVolume (GProxyVolumeMonitorAfc)
  ids:
   uuid: 'a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e'
  uuid=a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e
  activation_root=afc://a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e/
  themed icons:  [phone-apple-iphone]  [phone-apple]  [phone]
  can_mount=1
  can_eject=0
  should_automount=1
  Mount(0): David Zeuthen’s iPhone -> afc://a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e/
    Type: GProxyShadowMount (GProxyVolumeMonitorAfc)
    themed icons:  [phone-apple-iphone]  [phone-apple]  [phone]
    x_content_types: x-content/audio-player x-content/image-dcf
    can_unmount=1
    can_eject=0
    is_shadowed=0
Mount(0): David Zeuthen’s iPhone -> afc://a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e/
  Type: GDaemonMount
  themed icons:  [phone-apple-iphone]  [phone-apple]  [phone]
  x_content_types: x-content/audio-player x-content/image-dcf
  can_unmount=1
  can_eject=0
  is_shadowed=1
Comment 5 David Zeuthen (not reading bugmail) 2009-11-09 16:04:53 UTC
though... I don't see any dialogs for the afc:// drives when plugging in the device (I do get one for the gphoto2 one cf. bug 597803) - but I believe this may be related to bug 597802 which I'm still suffering from.
Comment 6 Bastien Nocera 2009-11-09 16:19:56 UTC
(In reply to comment #5)
> though... I don't see any dialogs for the afc:// drives when plugging in the
> device (I do get one for the gphoto2 one cf. bug 597803) - but I believe this
> may be related to bug 597802 which I'm still suffering from.

Was a bug in libusbmuxd, which was fixed in nikias' patch:
http://git.marcansoft.com/?p=usbmuxd.git;a=commitdiff;h=2a32789c0c431b312908b2b8fad3aa780058a238