diff --git a/CHANGELOG.md b/CHANGELOG.md index eb24c826..34e5d4df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Changes from v2.0.4-rc * Continue documentation updates +* Prevent overlapping `repertory` `ApiPort`'s * Removed passwords and secret key values from API calls * Renamed setting `ApiAuth` to `ApiPassword` * Require `--name,-na` option for encryption provider diff --git a/repertory/repertory/include/cli/mount.hpp b/repertory/repertory/include/cli/mount.hpp index ffc774e6..36457709 100644 --- a/repertory/repertory/include/cli/mount.hpp +++ b/repertory/repertory/include/cli/mount.hpp @@ -55,10 +55,8 @@ namespace repertory::cli::actions { mount(std::vector args, std::string data_directory, int &mount_result, provider_type prov, const std::string &remote_host, std::uint16_t remote_port, const std::string &unique_id) -> exit_code { - auto ret = exit_code::success; - lock_data lock(prov, unique_id); - const auto res = lock.grab_lock(); + auto res = lock.grab_lock(); if (res == lock_result::locked) { std::cerr << app_config::get_provider_display_name(prov) << " mount is already active" << std::endl; @@ -66,7 +64,7 @@ mount(std::vector args, std::string data_directory, } if (res != lock_result::success) { - ret = exit_code::lock_failed; + return exit_code::lock_failed; } #if defined(_WIN32) diff --git a/repertory/repertory/src/ui/handlers.cpp b/repertory/repertory/src/ui/handlers.cpp index 737051ba..17b3d0e8 100644 --- a/repertory/repertory/src/ui/handlers.cpp +++ b/repertory/repertory/src/ui/handlers.cpp @@ -510,6 +510,8 @@ void handlers::handle_post_mount(const httplib::Request &req, launch_process(prov, name, {location}, true); config_->set_mount_location(prov, name, location); + + launch_process(prov, name, {"-status"}); } res.status = http_error_codes::ok;