glib r7693 - trunk/gio



Author: matthiasc
Date: Fri Nov 28 07:27:13 2008
New Revision: 7693
URL: http://svn.gnome.org/viewvc/glib?rev=7693&view=rev

Log:
        * gdesktopappinfo.c (g_app_info_can_delete): Only allow deleting
        files that have been created by g_app_info_create_from_commandline.



Modified:
   trunk/gio/ChangeLog
   trunk/gio/gdesktopappinfo.c

Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c	(original)
+++ trunk/gio/gdesktopappinfo.c	Fri Nov 28 07:27:13 2008
@@ -1532,8 +1532,8 @@
 }
 
 static gboolean
-g_desktop_app_info_ensure_saved (GDesktopAppInfo *info,
-				 GError **error)
+g_desktop_app_info_ensure_saved (GDesktopAppInfo  *info,
+				 GError          **error)
 {
   GKeyFile *key_file;
   char *dirname;
@@ -1628,7 +1628,10 @@
   GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
 
   if (info->filename)
-    return g_access (info->filename, W_OK) == 0;
+    {
+      if (strstr (info->filename, "/userapp-"))
+        return g_access (info->filename, W_OK) == 0;
+    }
 
   return FALSE;
 }



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