diff --git a/xdg-open b/xdg-open
index a30b3ec..2a318df 100755
--- a/xdg-open
+++ b/xdg-open
@@ -73,7 +73,7 @@ fi
if [[ -e "$arg" ]]; then
# file or dir
- mime="$(file -ib "$arg" | cut -d';' -f1)"
+ mime="$(file -ib -- "$arg" | cut -d';' -f1)"
if [[ -f "$arg" ]]; then
ext="$(tr '[:upper:]' '[:lower:]' <<< "${arg##*.}")"
fi