display error if mount location is not found
This commit is contained in:
parent
52d210974b
commit
b9f5f774e2
@ -334,6 +334,7 @@ void handlers::handle_post_mount(auto &&req, auto &&res) const {
|
|||||||
} else {
|
} else {
|
||||||
if (not utils::file::directory{location}.exists()) {
|
if (not utils::file::directory{location}.exists()) {
|
||||||
res.status = http_error_codes::internal_error;
|
res.status = http_error_codes::internal_error;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_process(prov, name, fmt::format(R"("{}")", location), true);
|
launch_process(prov, name, fmt::format(R"("{}")", location), true);
|
||||||
|
@ -84,7 +84,7 @@ class Mount with ChangeNotifier {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 500) {
|
if (!unmount && response.statusCode == 500) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class _MountWidgetState extends State<MountWidget> {
|
|||||||
_enabled = true;
|
_enabled = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isActive || !context.mounted) {
|
if (success || isActive || !context.mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user