[rhythmbox] ipod: Don't handle iOS document mounts



commit 7b0f4cd4613b9b3f50c6a7c2abdfe756aaa25610
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 8 18:48:57 2011 +0000

    ipod: Don't handle iOS document mounts
    
    Don't popup "uninitialised iPod" warnings for the iOS documents
    mounts as supported in newer versions of gvfs.

 plugins/ipod/rb-ipod-helpers.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plugins/ipod/rb-ipod-helpers.c b/plugins/ipod/rb-ipod-helpers.c
index 9289252..0500d88 100644
--- a/plugins/ipod/rb-ipod-helpers.c
+++ b/plugins/ipod/rb-ipod-helpers.c
@@ -432,7 +432,17 @@ rb_ipod_helpers_is_ipod (GMount *mount, MPIDDevice *device_info)
 			gchar *device_dir;
 
 			if (g_file_has_uri_scheme (root, "afc") != FALSE) {
-				result = TRUE;
+				gchar *uri;
+				uri = g_file_get_uri (root);
+				/* afc://<40 chars>:stuff */
+				g_assert (strlen (uri) >= 46);
+				if (uri[6 + 40] == ':' &&
+				    uri[6 + 40 + 1] != '1') {
+					result = FALSE;
+				} else {
+					result = TRUE;
+				}
+				g_free (uri);
 			} else {
 				gchar *mount_point;
 				mount_point = g_file_get_path (root);



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