Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/cache
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-09-04 13:19:58 +0400
committerArthur Schiwon <blizzz@owncloud.com>2013-09-04 13:19:58 +0400
commit73e4b55ff3ac1619715ed877e6ae98ac62f6fb0d (patch)
tree99badb449df42dc9c0372657285ec8293d3fb2f5 /lib/cache
parent4e54e8b36d9d109890a9761f5c5260bba81107f0 (diff)
one check is enough
Diffstat (limited to 'lib/cache')
-rw-r--r--lib/cache/file.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/cache/file.php b/lib/cache/file.php
index 08bcf8fc078..361138e4736 100644
--- a/lib/cache/file.php
+++ b/lib/cache/file.php
@@ -99,13 +99,11 @@ class OC_Cache_File{
if(!is_resource($dh)) {
return null;
}
- if(is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- if($file!='.' and $file!='..') {
- $mtime = $storage->filemtime('/'.$file);
- if ($mtime < $now) {
- $storage->unlink('/'.$file);
- }
+ while (($file = readdir($dh)) !== false) {
+ if($file!='.' and $file!='..') {
+ $mtime = $storage->filemtime('/'.$file);
+ if ($mtime < $now) {
+ $storage->unlink('/'.$file);
}
}
}