summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/Icons.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml
index b308109..b95c369 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -237,11 +237,11 @@ Singleton {
path: "/etc/os-release"
onLoaded: {
const lines = text().split("\n");
- let osId = lines.find(l => l.startsWith("ID="))?.split("=")[1];
+ let osId = lines.find(l => l.startsWith("ID="))?.split("=")[1].replace(/"/g, "");
if (root.osIcons.hasOwnProperty(osId))
root.osIcon = root.osIcons[osId];
else {
- const osIdLike = lines.find(l => l.startsWith("ID_LIKE="))?.split("=")[1];
+ const osIdLike = lines.find(l => l.startsWith("ID_LIKE="))?.split("=")[1].replace(/"/g, "");
if (osIdLike)
for (const id of osIdLike.split(" "))
if (root.osIcons.hasOwnProperty(id))
@@ -251,7 +251,7 @@ Singleton {
let nameLine = lines.find(l => l.startsWith("PRETTY_NAME="));
if (!nameLine)
nameLine = lines.find(l => l.startsWith("NAME="));
- root.osName = nameLine.split("=")[1].slice(1, -1);
+ root.osName = nameLine.split("=")[1].replace(/"/g, "");
}
}
}