From 7f995507fec1133c8000b1dbb93ca23b1be1e720 Mon Sep 17 00:00:00 2001 From: Viktar Lukashonak Date: Sat, 14 May 2022 17:10:44 +0300 Subject: [PATCH] std::filesystem::path is a string representation --- src/modules/battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 4d025157..60194f0f 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -83,7 +83,7 @@ void waybar::modules::Battery::refreshBatteries() { if (!fs::is_directory(node)) { continue; } - auto dir_name = node.path().filename().string(); + auto dir_name = node.path().filename(); auto bat_defined = config_["bat"].isString(); if (((bat_defined && dir_name == config_["bat"].asString()) || !bat_defined) && (fs::exists(node.path() / "capacity") || fs::exists(node.path() / "charge_now")) &&