rhythmbox r6024 - in trunk: . rhythmdb



Author: jmatthew
Date: Sat Nov  8 14:42:02 2008
New Revision: 6024
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6024&view=rev

Log:
2008-11-09  Jonathan Matthew  <jonathan d14n org>

	patch by:  Jason Crain  <jason bluetree ath cx>

	* rhythmdb/rhythmdb.c: (rhythmdb_execute_enum_dir):
	Skip the file if g_file_enumerator_next_file fails.  From #556729.
	Still need to report a useful error here, but at least it doesn't
	crash any more.


Modified:
   trunk/ChangeLog
   trunk/rhythmdb/rhythmdb.c

Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c	(original)
+++ trunk/rhythmdb/rhythmdb.c	Sat Nov  8 14:42:02 2008
@@ -2559,9 +2559,15 @@
 		char *child_uri;
 
 		file_info = g_file_enumerator_next_file (dir_enum, db->priv->exiting, &error);
-		if (file_info == NULL && error == NULL) {
-			/* done */
-			break;
+		if (file_info == NULL) {
+			if (error == NULL) {
+				/* done */
+				break;
+			}
+
+			g_warning ("error getting next file: %s", error->message);
+			g_clear_error (&error);
+			continue;
 		}
 
 		child = g_file_get_child (dir, g_file_info_get_name (file_info));



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