[gtk+/gtk-3-18] file chooser: Allow saving even if executable attribute is not set



commit d5aa2e9e39d00ae5fbee2d2e3efcb2415fecbe9e
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Jan 20 11:36:12 2016 +0100

    file chooser: Allow saving even if executable attribute is not set
    
    Commit 8e975b2 (Bug 753969) introduced check of parent accessibility.
    Consequently it is not possible to save file if executable attribute
    is not set, which might happen for some gvfs backends. Let's assume
    that the folder is accessible even if the attribute is not set.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760881

 gtk/gtkfilechooserwidget.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index b10dd2e..b61c7e0 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -6474,7 +6474,11 @@ name_entry_get_parent_info_cb (GCancellable *cancellable,
   if (info)
     {
       parent_is_folder = _gtk_file_info_consider_as_directory (info);
-      parent_is_accessible = g_file_info_has_attribute (info, "access::can-execute") &&
+
+      /* Some gvfs backends do not set executable attribute, let's assume that
+       * the folder is accessible even if the attribute is not set.
+       */
+      parent_is_accessible = !g_file_info_has_attribute (info, "access::can-execute") ||
                              g_file_info_get_attribute_boolean (info, "access::can-execute");
     }
 


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