Skip to content

Commit

Permalink
fix(util): error appid from getAppIdFromAbsolutePath
Browse files Browse the repository at this point in the history
Log: tmp变量读出来的字符串多带了一个字符
  • Loading branch information
Groveer authored and kegechen committed Sep 9, 2024
1 parent 40cbafc commit 60e7392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/util/dutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ inline QString getAppIdFromAbsolutePath(const QString &path)
return {};
}

auto tmp = path.chopped(desktopSuffix.size() - 1);
auto tmp = path.chopped(desktopSuffix.size());
auto components = tmp.split(QDir::separator(), Qt::SkipEmptyParts);
auto location = std::find(components.cbegin(), components.cend(), "applications");
if (location == components.cend()) {
Expand Down

0 comments on commit 60e7392

Please sign in to comment.