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) {
|
||||
launch_process(prov, name, "-unmount");
|
||||
} else {
|
||||
if (not utils::file::directory{location}.exists()) {
|
||||
res.status = http_error_codes::internal_error;
|
||||
}
|
||||
|
||||
launch_process(prov, name, fmt::format(R"("{}")", location), true);
|
||||
}
|
||||
|
||||
|
@ -127,6 +127,8 @@ List<Validator> getSettingValidators(String settingPath) {
|
||||
return createHostNameOrIpValidators();
|
||||
case 'HostConfig.Protocol':
|
||||
return [(value) => constants.protocolTypeList.contains(value)];
|
||||
case 'Path':
|
||||
return [trimNotEmptyValidator];
|
||||
case 'RemoteConfig.ApiPort':
|
||||
return [notEmptyValidator, portIsValid];
|
||||
case 'RemoteConfig.EncryptionToken':
|
||||
|
Loading…
x
Reference in New Issue
Block a user