Skip to content

Commit

Permalink
fix quota check for unlimitted quota "0" (#2895)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas authored May 25, 2022
1 parent 5669219 commit 2fba9e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-unlimited-quota.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix unlimitted quota in spaces

Fixed the quota check when unlimitting a space, i.e. when setting the quota to "0".

https://github.com/owncloud/ocis/issues/3810
https://github.com/cs3org/reva/pull/2895
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ var CheckQuota = func(spaceRoot *Node, overwrite bool, oldSize, newSize uint64)
return false, errtypes.InsufficientStorage("disk full")
}
quotaByteStr, _ := xattrs.Get(spaceRoot.InternalPath(), xattrs.QuotaAttr)
if quotaByteStr == "" {
if quotaByteStr == "" || quotaByteStr == QuotaUnlimited {
// if quota is not set, it means unlimited
return true, nil
}
Expand Down

0 comments on commit 2fba9e0

Please sign in to comment.