[Portland-bugs] [Bug 92170] New: xdg-settings assumes desktop files have exactly one Exec line
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Sep 28 15:23:42 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=92170
Bug ID: 92170
Summary: xdg-settings assumes desktop files have exactly one
Exec line
Product: Portland
Version: unspecified
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: xdg-utils
Assignee: portland-bugs at lists.freedesktop.org
Reporter: chad.miller at canonical.com
Example command:
xdg-settings set default-web-browser chromium-browser.desktop
In searching the desktop file for suitability, it scans for all lines that
begin "Exec", and takes the result and packs it into a variable.
If there is exactly one Exec line, this takes out a command name to test for
existence, but when more than one matches, the program name is captured as
"firstexecprog\nsecondexecprog\nthirdexecprog", and "which" doesn't know how to
look up a program like that and the subsequent tests fail.
Output with sh's "-x" option on:
+ grep -E ^Exec(\[[^]=]*])?= /usr/share//applications/chromium-browser.desktop
+ command=chromium-browser
chromium-browser
chromium-browser
chromium-browser
+ which chromium-browser
chromium-browser
chromium-browser
chromium-browser
+ command=
+ readlink -f
+ return
+ binary=
+ [ ]
+ exit_failure_file_missing
+ [ 0 -gt 0 ]
In desktop_file_to_binary and binary_to_desktop_file functions, it makes false
assumptions how many times grep may match. Those should treat each Exec match
separately.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/portland-bugs/attachments/20150928/70de3561/attachment.html>
More information about the Portland-bugs
mailing list