[Portland-bugs] [Bug 35696] New: open_generic in xdg-open fails for filenames containing a ':' in the CWD

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 26 08:19:17 PDT 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35696

           Summary: open_generic in xdg-open fails for filenames
                    containing a ':' in the CWD
           Product: Portland
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
        AssignedTo: portland-bugs at lists.freedesktop.org
        ReportedBy: freedesktop at bzzt.net


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

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Portland-bugs mailing list