-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't include versions in quota check #2863
Conversation
977ce4e
to
372bfe7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice code style :)
if quotaByte == "" { | ||
// if quota is not set, it means unlimited | ||
return true, nil | ||
} | ||
total, _ = strconv.ParseUint(quotaByte, 10, 64) | ||
total, _ := strconv.ParseUint(quotaByte, 10, 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When reading the code, I found total
a bit of a missleading name. Maybe change to quotaByte
and the String of quotaByte to quotaByteStr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Kudos, SonarCloud Quality Gate passed! |
Fixed the quota check to not count the quota of previous versions.
This will fix the situation where the quota is exceeded and the user wants to create a new version of an existing file.
See this issue for more information: owncloud/ocis#2829