Skip to content

Commit 1552b58

Browse files
oknozorjackpot51
authored andcommitted
fix(plugin): load desktop entries from user dir
Currently the destkop-entry plugin retains the entries emitted by the freedesktop-desktop-entry crate in reverse order. For instance '$HOME/.local/share/applications/jetbrains-clion.desktop' is emitted first then overriden by '/usr/share/applications/jetbrains-clion.desktop'. Instead of `Hashset::replace`, `Hashset::insert` must be use to avoid overriding entries with higher priority. From freedesktop basedir specification: - " There is a set of preference ordered base directories relative to which data files should be searched. This set of directories is defined by the environment variable $XDG_DATA_DIRS." (see: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) From desktop-entries specification: - "If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used." (see: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)
1 parent 582bdc5 commit 1552b58

File tree

1 file changed

+1
-1
lines changed
  • plugins/src/desktop_entries

1 file changed

+1
-1
lines changed

plugins/src/desktop_entries/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl<W: AsyncWrite + Unpin> App<W> {
168168
src,
169169
};
170170

171-
deduplicator.replace(item);
171+
deduplicator.insert(item);
172172
}
173173
}
174174
}

0 commit comments

Comments
 (0)