fix: prevent icon showing when app_identifier is empty

This commit is contained in:
Azazel 2024-02-26 22:52:28 +00:00
parent c59bb509bd
commit 615c9050e7
1 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,10 @@ std::optional<std::string> getFileBySuffix(const std::string& dir, const std::st
std::optional<std::string> getDesktopFilePath(const std::string& app_identifier,
const std::string& alternative_app_identifier) {
if (app_identifier.empty()) {
return {};
}
const auto data_dirs = Glib::get_system_data_dirs();
for (const auto& data_dir : data_dirs) {
const auto data_app_dir = data_dir + "/applications/";