summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/xdg-open.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 244f214..cc2fc9c 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -306,10 +306,10 @@ open_lxde()
if (echo "$1" | grep -q '^file://' ||
! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:')
then
- local file="$(echo "$1" | sed 's%^file://%%')"
+ local file="$1"
# handle relative paths
- if ! echo "$file" | grep -q '^/'; then
+ if ! echo "$file" | egrep -q '^(file://)?/'; then
file="$(pwd)/$file"
fi