fix folders validation

Fixes #510
This commit is contained in:
Nicola Murino 2021-08-19 11:28:53 +02:00
parent 0a558203da
commit b99d4ce82e
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB

View file

@ -1534,6 +1534,7 @@ func createUserPasswordHash(user *User) error {
// ValidateFolder returns an error if the folder is not valid
// FIXME: this should be defined as Folder struct method
func ValidateFolder(folder *vfs.BaseVirtualFolder) error {
folder.FsConfig.SetEmptySecretsIfNil()
if folder.Name == "" {
return util.NewValidationError("folder name is mandatory")
}