Merge pull request #13842 from owncloud/is_file_2_is_readable
check if cache files are readable
This commit is contained in:
commit
068f6107c6
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue