summaryrefslogtreecommitdiff
path: root/x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c
diff options
context:
space:
mode:
Diffstat (limited to 'x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c')
-rw-r--r--x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c15
1 files changed, 15 insertions, 0 deletions
diff --git a/x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c b/x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c
new file mode 100644
index 0000000..e7118f8
--- /dev/null
+++ b/x11/gtk+3/patches/patch-gtk_gtkfilechooserwidget_c
@@ -0,0 +1,15 @@
1unveil(2): check if the XDG directories exist before showing them on the sidebar
2
3Index: gtk/gtkfilechooserwidget.c
4--- gtk/gtkfilechooserwidget.c.orig
5+++ gtk/gtkfilechooserwidget.c
6@@ -8229,7 +8229,8 @@ desktop_folder_handler (GtkFileChooserWidget *impl)
7 * See http://freedesktop.org/wiki/Software/xdg-user-dirs
8 */
9 name = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
10- if (!g_strcmp0 (name, g_get_home_dir ()))
11+ if (!g_strcmp0 (name, g_get_home_dir ()) ||
12+ !g_file_test (name, G_FILE_TEST_IS_DIR))
13 return;
14
15 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (impl), name);