Bug 66144 - [PATCH] Filenames containing special characters are handled wrong.
Summary: [PATCH] Filenames containing special characters are handled wrong.
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: 1.1.0 rc1
Hardware: Other All
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 07:25 UTC by shpertiary
Modified: 2013-06-25 15:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description shpertiary 2013-06-25 07:25:36 UTC
Filenames containing special characters are handled wrong.

For example:

$xdg-open double_menu\ \(2\).jpg 
START /usr/bin/xv double_menu (2).jpg
/usr/bin/xdg-open: eval: line 573: syntax error near unexpected token `('
/usr/bin/xdg-open: eval: line 573: `/usr/bin/xv double_menu (2).jpg'


Bash escaping sucks:). I have done following to fix:

$diff /tmp/xdg-open /usr/bin/xdg-open 
572,573c572,573
<                 echo START $command_exec $arguments_exec \"$arg\"
<                 eval $command_exec $arguments_exec \"$arg\"
---
>                 echo START $command_exec $arguments_exec "$arg"
>                 eval $command_exec $arguments_exec "$arg"

Seems to work.

Regards.
Comment 1 Rex Dieter 2013-06-25 15:36:02 UTC
Current git contains (at those lines):

        if [ -x "$command_exec" ] ; then
            if echo "$arguments" | grep -iq '%[fFuU]' ; then
                echo START "$command_exec" "$arguments_exec"
                eval "$command_exec" "$arguments_exec"
            else
                echo START "$command_exec" "$arguments_exec" "$arg"
                eval "$command_exec" "$arguments_exec" "$arg"
            fi

So, perhaps already fixed.


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.