Allowing disk limit percentages to be 0
This commit is contained in:
Christopher L. Shannon (cshannon) 2015-11-25 13:18:59 +00:00
parent 9acee62877
commit 3b658f8e1a
2 changed files with 2 additions and 3 deletions

View File

@ -96,8 +96,7 @@ public class StoreUsage extends PercentLimitUsage<StoreUsage> {
protected void updateLimitBasedOnPercent() { protected void updateLimitBasedOnPercent() {
usageLock.writeLock().lock(); usageLock.writeLock().lock();
try { try {
if (percentLimit >= 0 && store != null) {
if (percentLimit > 0 && store != null) {
File dir = StoreUtil.findParentDirectory(store.getDirectory()); File dir = StoreUtil.findParentDirectory(store.getDirectory());
if (dir != null) { if (dir != null) {

View File

@ -76,7 +76,7 @@ public class TempUsage extends PercentLimitUsage<TempUsage> {
protected void updateLimitBasedOnPercent() { protected void updateLimitBasedOnPercent() {
usageLock.writeLock().lock(); usageLock.writeLock().lock();
try { try {
if (percentLimit > 0 && store != null) { if (percentLimit >= 0 && store != null) {
File dir = StoreUtil.findParentDirectory(store.getDirectory()); File dir = StoreUtil.findParentDirectory(store.getDirectory());
if (dir != null) { if (dir != null) {