std::filesystem::path is a string representation
This commit is contained in:
parent
b39a8ede6c
commit
7f995507fe
|
@ -83,7 +83,7 @@ void waybar::modules::Battery::refreshBatteries() {
|
||||||
if (!fs::is_directory(node)) {
|
if (!fs::is_directory(node)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto dir_name = node.path().filename().string();
|
auto dir_name = node.path().filename();
|
||||||
auto bat_defined = config_["bat"].isString();
|
auto bat_defined = config_["bat"].isString();
|
||||||
if (((bat_defined && dir_name == config_["bat"].asString()) || !bat_defined) &&
|
if (((bat_defined && dir_name == config_["bat"].asString()) || !bat_defined) &&
|
||||||
(fs::exists(node.path() / "capacity") || fs::exists(node.path() / "charge_now")) &&
|
(fs::exists(node.path() / "capacity") || fs::exists(node.path() / "charge_now")) &&
|
||||||
|
|
Loading…
Reference in New Issue