gvfs r1274 - in trunk: . daemon



Author: alexl
Date: Thu Feb 14 15:53:38 2008
New Revision: 1274
URL: http://svn.gnome.org/viewvc/gvfs?rev=1274&view=rev

Log:
2008-02-14  Alexander Larsson  <alexl redhat com>

	* daemon/gvfsbackendcomputer.c:
	If lookup returns NULL it already set the error.
	Handle this in all callers.



Modified:
   trunk/ChangeLog
   trunk/daemon/gvfsbackendcomputer.c

Modified: trunk/daemon/gvfsbackendcomputer.c
==============================================================================
--- trunk/daemon/gvfsbackendcomputer.c	(original)
+++ trunk/daemon/gvfsbackendcomputer.c	Thu Feb 14 15:53:38 2008
@@ -697,11 +697,14 @@
       g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
       g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE);
       g_file_info_set_content_type (info, "inode/directory");
+
+      g_vfs_job_succeeded (G_VFS_JOB (job));
     }
   else if (file != NULL)
-    file_info_from_file (file, info);
-
-  g_vfs_job_succeeded (G_VFS_JOB (job));
+    {
+      file_info_from_file (file, info);
+      g_vfs_job_succeeded (G_VFS_JOB (job));
+    }
   
   return TRUE;
 }
@@ -722,9 +725,11 @@
 
   if (file != &root)
     {
-      g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
-                        G_IO_ERROR_NOT_SUPPORTED,
-                        _("Can't open mountable file"));
+      if (file != NULL)
+        g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
+                          G_IO_ERROR_NOT_SUPPORTED,
+                          _("Can't open mountable file"));
+      
       return TRUE;
     }
   



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