diff --git a/gio/ChangeLog b/gio/ChangeLog index 03a8f82d8..b4a408e95 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2008-11-28 Matthias Clasen + + * gdesktopappinfo.c (g_app_info_can_delete): Only allow deleting + files that have been created by g_app_info_create_from_commandline. + 2008-11-28 Matthias Clasen Bug 541715 – win32 : patch for warnings and signature problems in diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index dbf386745..ec85744a3 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -1532,8 +1532,8 @@ g_desktop_app_info_remove_supports_type (GAppInfo *appinfo, } 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 @@ g_desktop_app_info_can_delete (GAppInfo *appinfo) 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; }