diff --git a/repertory/repertory/src/ui/handlers.cpp b/repertory/repertory/src/ui/handlers.cpp index 9839ad83..d26beac4 100644 --- a/repertory/repertory/src/ui/handlers.cpp +++ b/repertory/repertory/src/ui/handlers.cpp @@ -334,6 +334,7 @@ void handlers::handle_post_mount(auto &&req, auto &&res) const { } else { if (not utils::file::directory{location}.exists()) { res.status = http_error_codes::internal_error; + return; } launch_process(prov, name, fmt::format(R"("{}")", location), true); diff --git a/web/repertory/lib/models/mount.dart b/web/repertory/lib/models/mount.dart index 58e2fc8b..2628ea78 100644 --- a/web/repertory/lib/models/mount.dart +++ b/web/repertory/lib/models/mount.dart @@ -84,7 +84,7 @@ class Mount with ChangeNotifier { ), ); - if (response.statusCode == 500) { + if (!unmount && response.statusCode == 500) { return false; } diff --git a/web/repertory/lib/widgets/mount_widget.dart b/web/repertory/lib/widgets/mount_widget.dart index bdca5ef7..f680cac0 100644 --- a/web/repertory/lib/widgets/mount_widget.dart +++ b/web/repertory/lib/widgets/mount_widget.dart @@ -163,7 +163,7 @@ class _MountWidgetState extends State { _enabled = true; }); - if (isActive || !context.mounted) { + if (success || isActive || !context.mounted) { return; }