Skip to content

Commit 390986f

Browse files
elParaguayoTycho Andersen
authored andcommitted
[StatusNotifier] fix recursive icon search
Tried to be too cute with previous code. Where there's no IconThemePath, we got an empty `Path` object which is equivalent to `Path('.')` meaning that we'd always do a recursive search on the current folder. This PR fixes that by only creating a `Path` object if there is a theme path. Fixes qtile#4959
1 parent 63ce551 commit 390986f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libqtile/widget/helpers/status_notifier/statusnotifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ async def _get_local_icon(self, fallback=True):
243243
return
244244

245245
try:
246-
icon_path = Path(await self.item.get_icon_theme_path())
246+
icon_path = await self.item.get_icon_theme_path()
247247
except (AttributeError, DBusError):
248248
icon_path = None
249249

250250
if icon_path:
251-
self.icon = self._get_custom_icon(icon_name, icon_path)
251+
self.icon = self._get_custom_icon(icon_name, Path(icon_path))
252252

253253
if not self.icon:
254254
self.icon = self._get_xdg_icon(icon_name)

0 commit comments

Comments
 (0)