From 45b3417bd79a054c75a062cb374e368d3e93cf4e Mon Sep 17 00:00:00 2001 From: davidsteinsland Date: Fri, 6 Sep 2013 15:46:01 +0200 Subject: [PATCH] Fixed race conditions for FileEngine --- lib/Cake/Cache/Engine/FileEngine.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index 47e0487d3..35b256bd8 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -210,7 +210,7 @@ class FileEngine extends CacheEngine { } $path = $this->_File->getRealPath(); $this->_File = null; - return unlink($path); + return @unlink($path); } /** @@ -291,7 +291,7 @@ class FileEngine extends CacheEngine { if ($file->isFile()) { $_path = $file->getRealPath(); $file = null; - unlink($_path); + @unlink($_path); } } } @@ -411,7 +411,7 @@ class FileEngine extends CacheEngine { $containsGroup = strpos($object->getPathName(), DS . $group . DS) !== false; $hasPrefix = strpos($object->getBaseName(), $this->settings['prefix']) === 0; if ($object->isFile() && $containsGroup && $hasPrefix) { - unlink($object->getPathName()); + @unlink($object->getPathName()); } } return true;