This commit is contained in:
parent
242109cfe5
commit
f1bf4f961b
@ -150,12 +150,21 @@ void mgmt_app_config::set_api_port(std::uint16_t api_port) {
|
|||||||
void mgmt_app_config::set_mount_location(provider_type prov,
|
void mgmt_app_config::set_mount_location(provider_type prov,
|
||||||
std::string_view name,
|
std::string_view name,
|
||||||
std::string_view location) {
|
std::string_view location) {
|
||||||
|
if (name.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
recur_mutex_lock lock(mtx_);
|
recur_mutex_lock lock(mtx_);
|
||||||
if (locations_[prov][std::string{name}] == std::string{location}) {
|
if (locations_[prov][std::string{name}] == std::string{location}) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
locations_[prov][std::string{name}] = std::string{location};
|
locations_[prov][std::string{name}] = std::string{location};
|
||||||
|
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
} // namespace repertory::ui
|
} // namespace repertory::ui
|
||||||
|
Loading…
x
Reference in New Issue
Block a user