diff --git a/src/detection/battery/battery_linux.c b/src/detection/battery/battery_linux.c index 025aee692..71ea2480a 100644 --- a/src/detection/battery/battery_linux.c +++ b/src/detection/battery/battery_linux.c @@ -160,10 +160,7 @@ static void parseBattery(int dfd, const char* id, FFBatteryOptions* options, FFl const char* ffDetectBattery(FFBatteryOptions* options, FFlist* results) { - FF_STRBUF_AUTO_DESTROY baseDir = ffStrbufCreateA(64); - ffStrbufAppendS(&baseDir, "/sys/class/power_supply/"); - - FF_AUTO_CLOSE_DIR DIR* dirp = opendir(baseDir.chars); + FF_AUTO_CLOSE_DIR DIR* dirp = opendir("/sys/class/power_supply/"); if(dirp == NULL) return "opendir(\"/sys/class/power_supply/\") == NULL";