From: Amos Jeffries Date: Mon, 18 Jul 2011 22:43:59 +0000 (+1200) Subject: Bug 3280: allow max-size unset and min-size=N to be true for large objects X-Git-Tag: take08~55^2~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b475997c26ae1e1463357a751e92f9fda435cea2;p=thirdparty%2Fsquid.git Bug 3280: allow max-size unset and min-size=N to be true for large objects --- diff --git a/src/store_dir.cc b/src/store_dir.cc index a7c90008fb..6925700c02 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -169,7 +169,10 @@ SwapDir::objectSizeIsAcceptable(int64_t objsize) const return false; // Else, make sure that the object size will fit. - return min_objsize <= objsize && max_objsize > objsize; + if (max_objsize == -1 && min_objsize <= objsize) + return true; + else + return min_objsize <= objsize && max_objsize > objsize; }