[PATCH] open_generic in xdg-open fails for filenames containing a ':' in the CWD
Submitted by raboof
Assigned to Portland Bugs
Description
open_generic in xdg-open checks whether the argument is a file (rather than a URI) with:
if (echo "$1" | grep -q '^file://' ||
! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:'); then
This fails when the file is in the CWD and called something like 'foo:bar.png'.
A more reliable check would be:
if (echo "$1" | grep -q '^file://' ||
test -e "$1"); then