(Linux) Fixed an issue where the battery was not detected

This commit is contained in:
Leon Styhre 2025-02-24 11:50:20 +01:00
parent 7c35e19abf
commit 4c06ef2dc3

View file

@ -435,6 +435,8 @@ void SystemStatus::getStatusBattery()
else if (std::find(entries.cbegin(), entries.cend(), sysEntry + "/battery") != entries.cend())
batteryDir = sysEntry + "/battery";
hasBattery = true;
if (!Utils::FileSystem::exists(batteryDir + "/status"))
hasBattery = false;
if (!Utils::FileSystem::exists(batteryDir + "/capacity"))