[gvfs] Disable x-content-types for jailbroken iDevices



commit 1d648805dbea63d98af14f3e45dcdf3eb3f77c14
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Apr 4 17:03:05 2010 +0100

    Disable x-content-types for jailbroken iDevices
    
    The jailbroken file system access isn't supported by
    libgpod, so it's useless for us to say that it's a
    media-player.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=614615

 daemon/gvfsbackendafc.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index a2ca298..9f396a7 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -395,12 +395,15 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
   lockdownd_client_free (lockdown_cli);
 
   /* Add camera item if necessary */
-  dcim_afcinfo = NULL;
-  if (afc_get_file_info (self->afc_cli, "/DCIM", &dcim_afcinfo) == AFC_E_SUCCESS)
-    g_vfs_backend_set_x_content_types (backend, camera_x_content_types);
-  else
-    g_vfs_backend_set_x_content_types (backend, media_player_x_content_types);
-  g_strfreev (dcim_afcinfo);
+  if (virtual_port < 2)
+    {
+      dcim_afcinfo = NULL;
+      if (afc_get_file_info (self->afc_cli, "/DCIM", &dcim_afcinfo) == AFC_E_SUCCESS)
+        g_vfs_backend_set_x_content_types (backend, camera_x_content_types);
+      else
+        g_vfs_backend_set_x_content_types (backend, media_player_x_content_types);
+      g_strfreev (dcim_afcinfo);
+    }
 
   self->connected = TRUE;
   g_vfs_job_succeeded (G_VFS_JOB(job));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]