banshee r3888 - in trunk/banshee: . src/Backends/Banshee.Hal/Banshee.HalBackend



Author: gburt
Date: Tue May  6 15:51:39 2008
New Revision: 3888
URL: http://svn.gnome.org/viewvc/banshee?rev=3888&view=rev

Log:
2008-05-06  Gabriel Burt  <gabriel burt gmail com>

	* src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs: Catch exceptions
	while trying to identify a HAL device as a volume.  Should fix BGO
	#528481.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs

Modified: trunk/banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs
==============================================================================
--- trunk/banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs	(original)
+++ trunk/banshee/src/Backends/Banshee.Hal/Banshee.HalBackend/Volume.cs	Tue May  6 15:51:39 2008
@@ -48,11 +48,17 @@
                 return null;
             }
             
-            Volume volume = (parent is ICdromDevice || (parent == null && device.QueryCapability ("volume.disc")))
-                ? DiscVolume.Resolve (parent, manager, device)
-                : new Volume (parent, manager, device);
+            try {
+                Volume volume = (parent is ICdromDevice || (parent == null && device.QueryCapability ("volume.disc")))
+                    ? DiscVolume.Resolve (parent, manager, device)
+                    : new Volume (parent, manager, device);
 
-            return CheckVolumeMounted (volume) ? volume : null;
+                return CheckVolumeMounted (volume) ? volume : null;
+            } catch (Exception e) {
+                Hyena.Log.Exception (e);
+            }
+
+            return null;
         }
         
         private BlockDevice parent;



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