View | Details | Raw Unified | Return to bug 202192 | Differences between
and this patch

Collapse All | Expand All

(-)x11-fm/thunar/files/patch-thunar_thunar-file.c (+24 lines)
Line 0 Link Here
1
--- thunar/thunar-file.c.orig	2015-05-22 13:25:36 UTC
2
+++ thunar/thunar-file.c
3
@@ -3225,17 +3225,11 @@ thunar_file_is_chmodable (const ThunarFile *file)
4
    *   b) the super-user id
5
    * and the file is not in the trash.
6
    */
7
-  if (file->info == NULL)
8
-    {
9
-      return (effective_user_id == 0 && !thunar_file_is_trashed (file));
10
-    }
11
-  else
12
-    {
13
-      return ((effective_user_id == 0 
14
-               || effective_user_id == g_file_info_get_attribute_uint32 (file->info,
15
-                                                                         G_FILE_ATTRIBUTE_UNIX_UID))
16
-              && !thunar_file_is_trashed (file));
17
-    }
18
+  if (thunar_file_is_trashed (file))
19
+      return (FALSE);
20
+  if (effective_user_id == 0)
21
+      return (TRUE);
22
+  return (thunar_file_is_writable (file));
23
 }
24
 
(-)x11-fm/thunar/files/patch-thunar_thunar-sendto-model.c (+32 lines)
Line 0 Link Here
1
--- thunar/thunar-sendto-model.c
2
+++ thunar/thunar-sendto-model.c
3
@@ -121,7 +121,9 @@ g_app_info_compare (gpointer a,
4
 static void
5
 thunar_sendto_model_load (ThunarSendtoModel *sendto_model)
6
 {
7
+#ifdef HAVE_GIO_UNIX
8
   GDesktopAppInfo *app_info = NULL;
9
+#endif
10
   gchar          **specs;
11
   gchar           *path;
12
   guint            n;
13
@@ -146,9 +148,6 @@ thunar_sendto_model_load (ThunarSendtoModel *sendto_model)
14
 
15
 #ifdef HAVE_GIO_UNIX
16
           app_info = g_desktop_app_info_new_from_keyfile (key_file);
17
-#else
18
-          /* FIXME try to create the app info ourselves in a platform independent way */
19
-#endif
20
 
21
           if (G_LIKELY (app_info != NULL))
22
             {
23
@@ -165,6 +164,9 @@ thunar_sendto_model_load (ThunarSendtoModel *sendto_model)
24
               if (mime_types != NULL)
25
                 g_object_set_data_full (G_OBJECT (app_info), "mime-types", mime_types, (GDestroyNotify) g_strfreev);
26
             }
27
+#else
28
+          /* FIXME try to create the app info ourselves in a platform independent way */
29
+#endif
30
 
31
           g_key_file_free (key_file);
32
         }

Return to bug 202192