Skip to content

Commit

Permalink
fix quota logic
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Oct 14, 2021
1 parent 0e06ee2 commit 558ffd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 558ffd6

Please sign in to comment.