[Portland-bugs] [Bug 31444] New: spurious capture of which in KMIMETYPEFINDER

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 7 06:19:57 PST 2010


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

           Summary: spurious capture of which in KMIMETYPEFINDER
           Product: Portland
           Version: 1.0
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: xdg-utils
        AssignedTo: portland-bugs at lists.freedesktop.org
        ReportedBy: giecrilj at stegny.2a.pl


I wonder what the purpose of the following lines in xdg-mime would be:

        KMIMETYPEFINDER=`which kmimetypefinder 2>/dev/null`
        $KMIMETYPEFINDER "$1" 2>/dev/null | head -n 1

Since the variable KMIMETYPEFINDER is not used anywhere else, the following
equivalent form would be more efficient:

        kmimetypefinder "$1" 2>/dev/null | head -n 1

Of course, there is a subtle difference when kmimetypefinder cannot be found
(that means, of course, that the PATH is set to a weird value or the system is
damaged).  In this case,  the error message is forcibly silenced and the
argument $1 gets SILENTLY EXECUTED, which is why I set severity to Major.

-- 
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