From 45452e58e23b67e5d85f53f39a7fe22cb4ccc66a Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 6 May 2015 08:37:34 -0300 Subject: Check if cachedir exist before try to rename it --- 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 3ef5e270..ee1d8b97 100755 --- a/config/squid3/34/squid.inc +++ b/config/squid3/34/squid.inc @@ -129,7 +129,7 @@ function squid_dash_z($cache_action='none') { $cachedir = ($settings['harddisk_cache_location'] ? $settings['harddisk_cache_location'] : '/var/squid/cache'); - if ($cache_action == "clean") { + if ($cache_action == "clean" && file_exists($cachedir)) { rename ($cachedir, "{$cachedir}.old"); mwexec_bg("/bin/rm -rf {$cachedir}.old"); } -- cgit v1.2.3