Dash does not handle .desktop files correctly if there are hyphens in the directory path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-lens-applications (Ubuntu) |
Fix Released
|
Low
|
Andrea Azzarone | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
The Unity dash can fail to display the icon or title from a .desktop file correctly if it resides under a directory containing a hyphen character.
[Test case]
As an example (on my 16.04 machine):
$ cat << EOF > test.desktop
[Desktop Entry]
Name=Hyphen test
Exec=/bin/true
Type=Application
Icon=/usr/
EOF
$ chmod +x test.desktop
$ mkdir ~/.local/
$ mv test.desktop ~/.local/
Now, open the dash and search for "hyphen". On my machine, I see the correct icon but no title is displayed underneath.
$ mv ~/.local/
Searching for "hyphen" in the dash now shows an entry with the correct icon and title (but also still shows the defunct previous entry without title).
The effect of the hyphenated path seems variable. Some apps show the wrong icon, some have a missing title, some have both errors.
The problem only seems to be with hyphens in the directories. Hyphens in the file itself are fine. See the screenshot - Might and Magic 4&5 has had a desktop file installed under a subdirectory with a hyphen, whereas Heroes of Might and Magic has a desktop file in the root directory but contains a hyphen in the filename. The latter is shown correctly, but the desktop files in the former directory are not shown properly.
[Possible Regressions]
Nothing known.
Related branches
- Marco Trevisan (Treviño): Approve
-
Diff: 22 lines (+10/-2)1 file modifiedsrc/daemon.vala (+10/-2)
- Andrea Azzarone (community): Approve
-
Diff: 37 lines (+17/-2)2 files modifieddebian/changelog (+7/-0)
src/daemon.vala (+10/-2)
Changed in unity (Ubuntu): | |
importance: | Undecided → Low |
assignee: | nobody → Andrea Azzarone (azzar1) |
tags: | added: desktop-trello-import |
Changed in unity (Ubuntu): | |
status: | New → Triaged |
Changed in unity (Ubuntu): | |
status: | Triaged → In Progress |
Changed in unity-lens-applications (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Andrea Azzarone (azzar1) |
importance: | Undecided → Low |
no longer affects: | unity (Ubuntu) |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Added to Trello: https:/ /trello. com/c/GIEHf8tn/ 5-bug-1582433- dash-does- not-handle- desktop- files-correctly -if-there- are-hyphens- in-the- directory- path