Skip to content

Commit 87bb6c6

Browse files
ellieplayswowjacobgkau
authored andcommitted
Changing how desktop_entries dedupes works to only add to dedupe list for valid entries
1 parent 926abeb commit 87bb6c6

File tree

1 file changed

+7
-3
lines changed
  • plugins/src/desktop_entries

1 file changed

+7
-3
lines changed

plugins/src/desktop_entries/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ impl<W: AsyncWrite + Unpin> App<W> {
7878
if deduplicator.contains(appid) {
7979
return None;
8080
}
81-
// Always cache already visited entries to allow overriding entries e.g. by
82-
// placing a modified copy in ~/.local/share/applications/
83-
deduplicator.insert(appid.to_owned());
8481

8582
de.name(&self.locales)?;
8683

@@ -136,6 +133,13 @@ impl<W: AsyncWrite + Unpin> App<W> {
136133
return None;
137134
}
138135

136+
// Always cache already visited entries to allow overriding entries e.g. by
137+
// placing a modified copy in ~/.local/share/applications/
138+
//
139+
// We only do this when we can add an entry to our list, otherwise we risk
140+
// ignoring user overrides or valid applications due to shell URL handlers
141+
deduplicator.insert(appid.to_owned());
142+
139143
Some(de)
140144
})
141145
})

0 commit comments

Comments
 (0)