std::filesystem::path is a string representation

This commit is contained in:
Viktar Lukashonak 2022-05-14 17:10:44 +03:00
parent b39a8ede6c
commit 7f995507fe
No known key found for this signature in database
GPG Key ID: 08A413AA87200A6F

View File

@ -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")) &&