Commit 2d8f57a1 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

check if cache files are readable

parent 92bc1b44
......@@ -83,7 +83,7 @@ class File {
public function hasKey($key) {
$storage = $this->getStorage();
if ($storage && $storage->is_file($key)) {
if ($storage && $storage->is_readable($key)) {
return true;
}
return false;
......
......@@ -52,7 +52,7 @@ class FileGlobal {
public function hasKey($key) {
$key = $this->fixKey($key);
$cache_dir = self::getCacheDir();
if ($cache_dir && is_file($cache_dir.$key)) {
if ($cache_dir && is_readable($cache_dir.$key)) {
$mtime = filemtime($cache_dir.$key);
if ($mtime < time()) {
unlink($cache_dir.$key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment