mirror of https://github.com/linuxdeepin/dtkcore
fix(util): error appid from `getAppIdFromAbsolutePath`
Log: tmp变量读出来的字符串多带了一个字符
This commit is contained in:
parent
40cbafcf8f
commit
280791db27
|
@ -96,7 +96,7 @@ inline QString getAppIdFromAbsolutePath(const QString &path)
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tmp = path.chopped(desktopSuffix.size() - 1);
|
auto tmp = path.chopped(desktopSuffix.size());
|
||||||
auto components = tmp.split(QDir::separator(), Qt::SkipEmptyParts);
|
auto components = tmp.split(QDir::separator(), Qt::SkipEmptyParts);
|
||||||
auto location = std::find(components.cbegin(), components.cend(), "applications");
|
auto location = std::find(components.cbegin(), components.cend(), "applications");
|
||||||
if (location == components.cend()) {
|
if (location == components.cend()) {
|
||||||
|
|
Loading…
Reference in New Issue