[Xfce4-commits] <thunar:master> Rename filename of insecure desktop files (bug #8786).

Nick Schermer noreply at xfce.org
Mon Oct 29 22:40:01 CET 2012


Updating branch refs/heads/master
         to 93095e43dd059d5474e1bf52f698e5357b7fd632 (commit)
       from 697b921b9a6fac4e3901bcb9a0bdd93f2f452a3a (commit)

commit 93095e43dd059d5474e1bf52f698e5357b7fd632
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Oct 29 22:39:14 2012 +0100

    Rename filename of insecure desktop files (bug #8786).

 thunar/thunar-file.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index f4eda62..f885d27 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -1571,6 +1571,7 @@ thunar_file_rename (ThunarFile   *file,
   GError               *err = NULL;
   GFile                *previous_file;
   GFile                *renamed_file;
+  gboolean              is_secure;
 
   _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
   _thunar_return_val_if_fail (g_utf8_validate (name, -1, NULL), FALSE);
@@ -1578,7 +1579,8 @@ thunar_file_rename (ThunarFile   *file,
   _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
   /* check if this file is a desktop entry */
-  if (thunar_file_is_desktop_file (file, NULL))
+  if (thunar_file_is_desktop_file (file, &is_secure)
+      && is_secure)
     {
       /* try to load the desktop entry into a key file */
       key_file = thunar_g_file_query_key_file (file->gfile, cancellable, &err);


More information about the Xfce4-commits mailing list