gedit r6363 - in trunk: . plugins/filebrowser



Author: jessevdk
Date: Fri Aug  8 12:53:04 2008
New Revision: 6363
URL: http://svn.gnome.org/viewvc/gedit?rev=6363&view=rev

Log:
        * plugins/filebrowser/gedit-file-browser-store.c: fixed handling
        mount operation problems


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	Fri Aug  8 12:53:04 2008
@@ -2521,8 +2521,6 @@
 		       0, 
 		       GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
 		       error->message);
-
-	g_error_free (error);
 	
 	/* Set the virtual root to the root */
 	root = model->priv->root;
@@ -2543,11 +2541,11 @@
 	  GAsyncResult * res, 
 	  MountInfo * mount_info)
 {
-	GFile * mounted_on;
+	gboolean mounted;
 	GError * error = NULL;
 	GeditFileBrowserStore * model = mount_info->model;
 	
-	mounted_on = g_file_mount_mountable_finish (file, res, &error);
+	mounted = g_file_mount_enclosing_volume_finish (file, res, &error);
 	
 	if (g_cancellable_is_cancelled (mount_info->cancellable))
 	{
@@ -2557,16 +2555,18 @@
 		// Reset because it might be reused?
 		g_cancellable_reset (mount_info->cancellable);
 	}
-	else if (mounted_on)
+	else if (mounted)
 	{
 		model_root_mounted (model, mount_info->virtual_root);
-		g_object_unref (mounted_on);
 	}
 	else if (error->code != G_IO_ERROR_CANCELLED)
 	{
 		handle_root_error (model, error);
 	}
 	
+	if (error)
+		g_error_free (error);
+
 	g_object_unref (mount_info->operation);
 	g_object_unref (mount_info->cancellable);
 	g_free (mount_info->virtual_root);
@@ -2606,12 +2606,13 @@
 						       mount_info->cancellable,
 						       (GAsyncReadyCallback)mount_cb,
 						       mount_info);
-			g_error_free (error);
 		}
 		else
 		{
 			handle_root_error (model, error);
 		}
+		
+		g_error_free (error);
 	} else {
 		g_object_unref (info);
 		



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