Bug 32487 - xdg-open fallback fails because of variable set in open_generic_xdg_mime()
Summary: xdg-open fallback fails because of variable set in open_generic_xdg_mime()
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-17 19:02 UTC by t3slider
Modified: 2011-07-05 09:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description t3slider 2010-12-17 19:02:22 UTC
open_generic() calls
open_generic_xdg_mime "$file"

In open_generic_xdg_mime(), the existence of the appropriate .desktop file is checked:
file="$x/applications/$default"
if [ -r "$file" ] ; then

This of course resets the $file variable that was originally passed to open_generic_xdg_mime() (referenced by $1 in the function), and if open_generic_xdg_mime() fails then it tries to fallback to run-mailcap or mimeinfo, using $file as the parameter (which now references a .desktop file). Launching via the browser fallback should still work because it uses $1, but $file was used in open_generic() for a reason. Additionally, if the fallback is used, it will open the .desktop file in the default editor instead of failing and passing to the browser-based fallback.

Line 395 should declare file as local, or the variable in open_generic_xdg_mime() should be renamed.
Comment 2 Rex Dieter 2011-07-05 09:42:06 UTC
*** Bug 38047 has been marked as a duplicate of this bug. ***


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.