godlikemouse / xfce4-finder

Smart and intuitive application finder, complete with theme and customization support for the XFCE desktop.
MIT License
11 stars 5 forks source link

Fix issue where no applications are shown if a search directory cannot be found. #6

Closed neoh4x0r closed 4 years ago

neoh4x0r commented 4 years ago

If a directory does not exist (e.g. /usr/share/applications/kde4) then the code in on_search_text_change() would stop processing an no applications would appear.

Instead of returning if opendir(directory_text.data()) fails, just continue processing.

This probably comes from there being no guarantee (no invariant) that the standard library (std::vector) would not reorder the search directory entries and not maintain the order specified in the source.