Bug 35696

Summary: [PATCH] open_generic in xdg-open fails for filenames containing a ':' in the CWD
Product: Portland Reporter: raboof <freedesktop>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description raboof 2011-03-26 08:19:17 UTC
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
Comment 1 GitLab Migration User 2019-02-16 13:30:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/42.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.