summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fabo@debian.org>2010-12-31 14:20:28 +0200
committerFathi Boudra <fabo@debian.org>2010-12-31 14:20:28 +0200
commit1a0f10dee6d0414c8f43e19bcfbb29cca91712fb (patch)
tree655e2465b6bba708aacf20050579112a07254aa3
parent25af23cb3edf9accde30a5aae36fd6579445bd99 (diff)
xdg-open: declare file variable as local. (BR32487)
-rw-r--r--ChangeLog1
-rwxr-xr-xscripts/xdg-open2
-rw-r--r--scripts/xdg-open.in2
3 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b8bb5f..6c8d34d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
2010-12-31 Fathi Boudra <fabo@freedesktop.org>
* xdg-mime: correct install text to use type/subtype.
Thanks to Christopher Yeleighton. (BR31441)
+ * xdg-open: declare file variable as local. (BR32487)
* xdg-open: decode file:// urls. Thanks to Henning Garus.
2010-11-18 Rex Dieter <rdieter@fedoraproject.org>
diff --git a/scripts/xdg-open b/scripts/xdg-open
index cb4ae50..ac336e3 100755
--- a/scripts/xdg-open
+++ b/scripts/xdg-open
@@ -393,7 +393,7 @@ open_generic_xdg_mime()
[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
- file="$x/applications/$default"
+ local file="$x/applications/$default"
if [ -r "$file" ] ; then
command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
command_exec=`which $command 2>/dev/null`
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 718806d..bc756d0 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -94,7 +94,7 @@ open_generic_xdg_mime()
[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
- file="$x/applications/$default"
+ local file="$x/applications/$default"
if [ -r "$file" ] ; then
command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
command_exec=`which $command 2>/dev/null`