Skip to content
Snippets Groups Projects
Commit 068f6107 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #13842 from owncloud/is_file_2_is_readable

check if cache files are readable
parents 297b52fa 86935fab
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,7 @@ class File {
public function hasKey($key) {
$storage = $this->getStorage();
if ($storage && $storage->is_file($key)) {
if ($storage && $storage->is_file($key) && $storage->isReadable($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_file($cache_dir.$key) && is_readable($cache_dir.$key)) {
$mtime = filemtime($cache_dir.$key);
if ($mtime < time()) {
unlink($cache_dir.$key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment