fix(folders): allow correct max depth on update (#112570)

This commit is contained in:
Jean-Philippe Quéméner
2025-10-17 12:17:13 +02:00
committed by GitHub
parent 208ccd054b
commit d746266b0d
3 changed files with 30 additions and 17 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ func validateOnUpdate(ctx context.Context,
}
// if by moving a folder we exceed the max depth, return an error
if len(info.Items)+1 >= maxDepth {
if len(info.Items) > maxDepth+1 {
return folder.ErrMaximumDepthReached.Errorf("maximum folder depth reached")
}
return nil