mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
Only allow deleting files that have been created by
* gdesktopappinfo.c (g_app_info_can_delete): Only allow deleting files that have been created by g_app_info_create_from_commandline. svn path=/trunk/; revision=7693
This commit is contained in:
parent
77a8c5cc15
commit
688b2e0ed2
@ -1,3 +1,8 @@
|
|||||||
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* 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 <mclasen@redhat.com>
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 541715 – win32 : patch for warnings and signature problems in
|
Bug 541715 – win32 : patch for warnings and signature problems in
|
||||||
|
@ -1628,7 +1628,10 @@ g_desktop_app_info_can_delete (GAppInfo *appinfo)
|
|||||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||||
|
|
||||||
if (info->filename)
|
if (info->filename)
|
||||||
|
{
|
||||||
|
if (strstr (info->filename, "/userapp-"))
|
||||||
return g_access (info->filename, W_OK) == 0;
|
return g_access (info->filename, W_OK) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user