summaryrefslogtreecommitdiff
path: root/user/xdg-utils/xdg-open-spaces.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/xdg-utils/xdg-open-spaces.patch')
-rw-r--r--user/xdg-utils/xdg-open-spaces.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/user/xdg-utils/xdg-open-spaces.patch b/user/xdg-utils/xdg-open-spaces.patch
new file mode 100644
index 000000000..7583a9dc3
--- /dev/null
+++ b/user/xdg-utils/xdg-open-spaces.patch
@@ -0,0 +1,38 @@
+From cc686869e9801b09abc29a3e72718ae0520aa97e Mon Sep 17 00:00:00 2001
+From: Dominik Schmidt <dominik@schm1dt.ch>
+Date: Sat, 8 Dec 2018 19:56:44 +0100
+Subject: [PATCH] xdg-open: Fix unquoted variable expansion when looking for
+ .desktop files
+
+The recursive find algorithm for the .desktop files has an unquoted path expansion
+in the generic case, when no desktop environment specific tool is found.
+Hence, if we have a directory layout containing something along the lines of
+
+ ~/.local/share/applications/foo bar/
+
+Then the recursion will expand into searching in:
+
+ * `~/.local/share/applications/foo`
+ * `~/bar/*`
+
+instead of `~/.local/share/applications/foo bar/*`
+---
+ scripts/xdg-open.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
+index 202f3e3..b3e0ba9 100644
+--- a/scripts/xdg-open.in
++++ b/scripts/xdg-open.in
+@@ -328,7 +328,7 @@ search_desktop_file()
+ fi
+ fi
+
+- for d in $dir/*/; do
++ for d in "$dir"/*/; do
+ [ -d "$d" ] && search_desktop_file "$default" "$d" "$target"
+ done
+ }
+--
+2.21.0
+