summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shared/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 4a970af3b1..74f29949c9 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5999,7 +5999,7 @@ int on_ac_power(void) {
d = opendir("/sys/class/power_supply");
if (!d)
- return -errno;
+ return errno == ENOENT ? true : -errno;
for (;;) {
struct dirent *de;