Skip to content

Commit

Permalink
sqash xdg
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Nov 18, 2023
1 parent 738e70b commit 5d1c04d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion applications_xdg/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ vector<IndexItem> Plugin::indexApps(const bool &abort) const
// To determine the ID of a desktop file, make its full path relative to
// the $XDG_DATA_DIRS component in which the desktop file is installed,
// remove the "applications/" prefix, and turn '/' into '-'.
QString desktopFileId = fIt.filePath().remove(QRegularExpression("^.*applications/")).replace("/","-");
static QRegularExpression re("^.*applications/");
QString desktopFileId = fIt.filePath().remove(re).replace("/","-");

if (const auto &[it, success] = desktopFiles.emplace(desktopFileId, fIt.filePath()); !success)
DEBG << QString("Desktop file '%1' will be skipped: Shadowed by '%2'").arg(fIt.filePath(), desktopFiles[desktopFileId]);
Expand Down

0 comments on commit 5d1c04d

Please sign in to comment.