mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
parent
89bc50aa81
commit
d03020e2b8
1 changed files with 1 additions and 0 deletions
|
@ -1560,6 +1560,7 @@ func createUserPasswordHash(user *User) error {
|
||||||
// ValidateFolder returns an error if the folder is not valid
|
// ValidateFolder returns an error if the folder is not valid
|
||||||
// FIXME: this should be defined as Folder struct method
|
// FIXME: this should be defined as Folder struct method
|
||||||
func ValidateFolder(folder *vfs.BaseVirtualFolder) error {
|
func ValidateFolder(folder *vfs.BaseVirtualFolder) error {
|
||||||
|
folder.FsConfig.SetEmptySecretsIfNil()
|
||||||
if folder.Name == "" {
|
if folder.Name == "" {
|
||||||
return &ValidationError{err: "folder name is mandatory"}
|
return &ValidationError{err: "folder name is mandatory"}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue