display error if mount location is not found

This commit is contained in:
Scott E. Graves 2025-03-15 18:43:43 -05:00
parent 52d210974b
commit b9f5f774e2
3 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -84,7 +84,7 @@ class Mount with ChangeNotifier {
),
);
if (response.statusCode == 500) {
if (!unmount && response.statusCode == 500) {
return false;
}

View File

@ -163,7 +163,7 @@ class _MountWidgetState extends State<MountWidget> {
_enabled = true;
});
if (isActive || !context.mounted) {
if (success || isActive || !context.mounted) {
return;
}