diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-09-04 13:19:58 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-09-04 13:19:58 +0400 |
commit | 73e4b55ff3ac1619715ed877e6ae98ac62f6fb0d (patch) | |
tree | 99badb449df42dc9c0372657285ec8293d3fb2f5 /lib/cache | |
parent | 4e54e8b36d9d109890a9761f5c5260bba81107f0 (diff) |
one check is enough
Diffstat (limited to 'lib/cache')
-rw-r--r-- | lib/cache/file.php | 12 |
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); } } } |