From 9743a2e9b8dafd5d0739e8e9b8fe3ea4b912f15a Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:15:20 +1000 Subject: icons: fix quoting issues --- utils/Icons.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils') 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, ""); } } } -- cgit v1.2.3-freya