resolve mount location

This commit is contained in:
sgraves committed 2026-10-08 13:39:52 -05:00
1 parent a8715c8ec4
commit 41fe87d90a
1 file changed
+5 -3
@@ -40,7 +40,7 @@ template <typename data_t>
{repertory::provider_type::remote, nlohmann::json::object()}, {repertory::provider_type::remote, nlohmann::json::object()},
{repertory::provider_type::s3, nlohmann::json::object()}, {repertory::provider_type::s3, nlohmann::json::object()},
{repertory::provider_type::sia, nlohmann::json::object()}, {repertory::provider_type::sia, nlohmann::json::object()},
}; };
if (json.is_null() || json.empty()) { if (json.is_null() || json.empty()) {
return map_of_maps; return map_of_maps;
@@ -390,12 +390,14 @@ void mgmt_app_config::set_mount_location(provider_type prov,
return; return;
} }
auto resolved_location = utils::path::absolute(location);
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}] == resolved_location) {
return; return;
} }
locations_[prov][std::string{name}] = std::string{location}; locations_[prov][std::string{name}] = resolved_location;
save(); save();
} }