diff options
Diffstat (limited to 'apps/files_external/lib/irods.php')
-rw-r--r-- | apps/files_external/lib/irods.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php index b8191db2f2e..6d4f66e856e 100644 --- a/apps/files_external/lib/irods.php +++ b/apps/files_external/lib/irods.php @@ -56,7 +56,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ } else { throw new \Exception(); } - + } public static function login( $params ) { @@ -138,11 +138,13 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ private function collectionMTime($path) { $dh = $this->opendir($path); $lastCTime = $this->filemtime($path); - while (($file = readdir($dh)) !== false) { - if ($file != '.' and $file != '..') { - $time = $this->filemtime($file); - if ($time > $lastCTime) { - $lastCTime = $time; + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if ($file != '.' and $file != '..') { + $time = $this->filemtime($file); + if ($time > $lastCTime) { + $lastCTime = $time; + } } } } |