Merge branch 'main' into improve-wireguard

This commit is contained in:
Myzel394 2025-03-23 17:35:35 +01:00
commit 5de2711b03

View File

@ -47,16 +47,16 @@ func (v PathValue) GetTypeDescription() []string {
} }
func (v PathValue) DeprecatedCheckIsValid(value string) []*InvalidValue { func (v PathValue) DeprecatedCheckIsValid(value string) []*InvalidValue {
if v.RequiredType == PathTypeExistenceOptional {
return nil
}
if !utils.DoesPathExist(value) { if !utils.DoesPathExist(value) {
if v.RequiredType == PathTypeExistenceOptional { return []*InvalidValue{{
return nil Err: PathDoesNotExistError{},
} else { Start: 0,
return []*InvalidValue{{ End: uint32(len(value)),
Err: PathDoesNotExistError{}, }}
Start: 0,
End: uint32(len(value)),
}}
}
} }
isValid := false isValid := false