gedit r6411 - in trunk: . plugins/filebrowser



Author: pborelli
Date: Thu Aug 14 09:26:59 2008
New Revision: 6411
URL: http://svn.gnome.org/viewvc/gedit?rev=6411&view=rev

Log:
2008-08-14  Paolo Borelli  <pborelli katamail com>

	* plugins/filebrowser/gedit-file-browser-store.c: do not crash
	if dir was removed. Bug #547724.



Modified:
   trunk/ChangeLog
   trunk/plugins/filebrowser/gedit-file-browser-store.c

Modified: trunk/plugins/filebrowser/gedit-file-browser-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-browser-store.c	(original)
+++ trunk/plugins/filebrowser/gedit-file-browser-store.c	Thu Aug 14 09:26:59 2008
@@ -2156,17 +2156,18 @@
 {
 	GError * error = NULL;
 	GFileEnumerator * enumerator;
-	
+
 	enumerator = g_file_enumerate_children_finish (file, result, &error);
-	
+
 	if (enumerator == NULL) {
-		/* Simply return if we were cancelled */
+		/* Simply return if we were cancelled or if the dir is not there */
 		FileBrowserNodeDir *dir = async->dir;
 		g_free (async);
-		
-		if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_CANCELLED)
+
+		if (error->domain == G_IO_ERROR &&
+		    (error->code == G_IO_ERROR_CANCELLED || error->code == G_IO_ERROR_NOT_FOUND))
 			return;
-		
+
 		/* Otherwise handle the error appropriately */
 		g_signal_emit (dir->model,
 			       model_signals[ERROR],



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