[maemo-commits] [maemo-commits] r11788 - projects/haf/trunk/hildon-fm/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 23 18:48:37 EEST 2007
Author: marivoll
Date: 2007-05-23 18:48:37 +0300 (Wed, 23 May 2007)
New Revision: 11788

Modified:
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-root.c
Log:
	* hildon-fm/hildon-file-system-root.c
	(hildon_file_system_root_create_child_location): Also accept
	direct children of "file:///media/usb/".


Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-root.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-root.c	2007-05-23 15:47:35 UTC (rev 11787)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-root.c	2007-05-23 15:48:37 UTC (rev 11788)
@@ -88,9 +88,14 @@
 {
   HildonFileSystemSpecialLocation *child = NULL;
 
+  /* XXX - Cough, a bit of hardcoding, it is better to ask GnomeVFS
+           whether this is a volume or drive.
+   */
   if (g_str_has_prefix (uri, "drive://")
       || (g_str_has_prefix (uri, "file:///media/")
-          && strchr (uri + 14, '/') == NULL))
+          && strchr (uri + 14, '/') == NULL)
+      || (g_str_has_prefix (uri, "file:///media/usb/")
+          && strchr (uri + 18, '/') == NULL))
     {
       child = g_object_new (HILDON_TYPE_FILE_SYSTEM_VOLDEV, NULL);
       child->basepath = g_strdup (uri);


More information about the maemo-commits mailing list