Package: xdg-utils
Version: 1.1.0~rc1+git20111210-7.1
Xdg-open reads the entire file while determining the program to open it
with. This may take a long time if the file is large or on a slow medium.
I use fluxbox and therefore xdg-open uses open_generic_xdg_mime(). The for
loop (L539) is run 3 times and first two iterations do not match either of
the following if clauses. Therefore the original filename ($file) is
passed as an argument to the following greps (L549,L551) and the file is
grepped through several times.
As a quick fix I added an else clause clearing the $file in case the if's
do not match. A more proper fix might be to verify that $file is actually
*.desktop in the latter if clause (L348), but I'll leave that to the pros
:)
for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
local file
# look for both vendor-app.desktop, vendor/app.desktop
if [ -r "$x/applications/$default" ]; then
file="$x/applications/$default"
elif [ -r "$x/applications/`echo $default | sed -e 's|-|/|'`" ]; then
file="$x/applications/`echo $default | sed -e 's|-|/|'`"
+ else
+ file=""
fi
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]