refactor locks
This commit is contained in:
parent
ad7a557601
commit
124f17b084
@ -464,8 +464,9 @@ void handlers::handle_get_mount_status(const httplib::Request &req,
|
|||||||
|
|
||||||
auto lines = launch_process(prov, name, {"-status"});
|
auto lines = launch_process(prov, name, {"-status"});
|
||||||
|
|
||||||
nlohmann::json result(
|
auto result{
|
||||||
nlohmann::json::parse(utils::string::join(lines, '\n')).at(status_name));
|
nlohmann::json::parse(utils::string::join(lines, '\n')),
|
||||||
|
};
|
||||||
if (result.at("Location").get<std::string>().empty()) {
|
if (result.at("Location").get<std::string>().empty()) {
|
||||||
result.at("Location") = config_->get_mount_location(prov, name);
|
result.at("Location") = config_->get_mount_location(prov, name);
|
||||||
} else if (result.at("Active").get<bool>()) {
|
} else if (result.at("Active").get<bool>()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user