handle mount location not found
This commit is contained in:
parent
69c574b906
commit
d0f2f78698
@ -323,6 +323,10 @@ void handlers::handle_post_mount(auto &&req, auto &&res) const {
|
|||||||
if (unmount) {
|
if (unmount) {
|
||||||
launch_process(prov, name, "-unmount");
|
launch_process(prov, name, "-unmount");
|
||||||
} else {
|
} else {
|
||||||
|
if (not utils::file::directory{location}.exists()) {
|
||||||
|
res.status = http_error_codes::internal_error;
|
||||||
|
}
|
||||||
|
|
||||||
launch_process(prov, name, fmt::format(R"("{}")", location), true);
|
launch_process(prov, name, fmt::format(R"("{}")", location), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +127,8 @@ List<Validator> getSettingValidators(String settingPath) {
|
|||||||
return createHostNameOrIpValidators();
|
return createHostNameOrIpValidators();
|
||||||
case 'HostConfig.Protocol':
|
case 'HostConfig.Protocol':
|
||||||
return [(value) => constants.protocolTypeList.contains(value)];
|
return [(value) => constants.protocolTypeList.contains(value)];
|
||||||
|
case 'Path':
|
||||||
|
return [trimNotEmptyValidator];
|
||||||
case 'RemoteConfig.ApiPort':
|
case 'RemoteConfig.ApiPort':
|
||||||
return [notEmptyValidator, portIsValid];
|
return [notEmptyValidator, portIsValid];
|
||||||
case 'RemoteConfig.EncryptionToken':
|
case 'RemoteConfig.EncryptionToken':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user