Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed race conditions for FileEngine

  • Loading branch information...
commit 45b3417bd79a054c75a062cb374e368d3e93cf4e 1 parent 0f528c2
David Steinsland davidsteinsland authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Cache/Engine/FileEngine.php
6 lib/Cake/Cache/Engine/FileEngine.php
View
@@ -210,7 +210,7 @@ public function delete($key) {
}
$path = $this->_File->getRealPath();
$this->_File = null;
- return unlink($path);
+ return @unlink($path);
}
/**
@@ -291,7 +291,7 @@ protected function _clearDirectory($path, $now, $threshold) {
if ($file->isFile()) {
$_path = $file->getRealPath();
$file = null;
- unlink($_path);
+ @unlink($_path);
}
}
}
@@ -411,7 +411,7 @@ public function clearGroup($group) {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.