summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-02-02 23:19:54 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-02-02 23:19:54 +0100
commit2d8f57a1ea5e503ba04844fb24cf1c2f4576dd0d (patch)
tree46568c07b06f31f3d4816f3d21f07d87c9f9899a /lib
parent92bc1b44d5230b6256be8f1f79d364c9bb277944 (diff)
downloadnextcloud-server-2d8f57a1ea5e503ba04844fb24cf1c2f4576dd0d.tar.gz
nextcloud-server-2d8f57a1ea5e503ba04844fb24cf1c2f4576dd0d.zip
check if cache files are readable
Diffstat (limited to 'lib')
-rw-r--r--lib/private/cache/file.php2
-rw-r--r--lib/private/cache/fileglobal.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php
index 4e7c065678e..7bffc2cc2d2 100644
--- a/lib/private/cache/file.php
+++ b/lib/private/cache/file.php
@@ -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;
diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php
index d9e0fd46d37..61902d273c7 100644
--- a/lib/private/cache/fileglobal.php
+++ b/lib/private/cache/fileglobal.php
@@ -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);