From 558ffd65392e3265bd40aa382f7ae072f5c9a02a Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 14 Oct 2021 21:43:30 +0200 Subject: [PATCH] fix quota logic --- pkg/storage/utils/decomposedfs/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/utils/decomposedfs/upload.go b/pkg/storage/utils/decomposedfs/upload.go index 5e69270d269..70921d4dff1 100644 --- a/pkg/storage/utils/decomposedfs/upload.go +++ b/pkg/storage/utils/decomposedfs/upload.go @@ -760,7 +760,7 @@ func checkQuota(ctx context.Context, fs *Decomposedfs, spaceRoot *node.Node, fil return false, errtypes.InsufficientStorage("disk full") } - if (fileSize > total-used || total < used) && !enoughDiskSpace { + if fileSize > total-used || total < used { return false, errtypes.InsufficientStorage("quota exceeded") } return true, nil