From 781a2fa1be222ad4c4b2c32e293d4bd62ddf92b3 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Thu, 1 Oct 2015 19:37:22 +0200 Subject: Fix the numdirs comparison here (int vs. string), make this more readable as well Cache is getting always recreated because of strict comparison. --- config/squid3/34/squid.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc index d5fed4ce..fc957e34 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -166,7 +166,7 @@ function squid_dash_z($cache_action = 'none') { // Re-create the cachedir if clean is forced by cronjob/manually, // or if the cachedir changed, or level1_subdirs don't exist or the number of level1_subdirs changed - if ($cache_action == "clean" || ((!is_dir($cachedir)) || (!is_dir($cachedir . '/00'))) || ($numdirs !== $currentdirs)) { + if ($cache_action == "clean" || !is_dir($cachedir) || !is_dir($cachedir . '/00') || $numdirs != $currentdirs) { // cannot nuke disk cache while Squid is running squid_stop_monitor(); if (is_service_running('squid')) { -- cgit v1.2.3