summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/irods.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/irods.php')
-rw-r--r--apps/files_external/lib/irods.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php
index 7ec3b3a0cfc..f7279a6c5d2 100644
--- a/apps/files_external/lib/irods.php
+++ b/apps/files_external/lib/irods.php
@@ -55,7 +55,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{
} else {
throw new \Exception();
}
-
+
}
public static function login( $params ) {
@@ -137,11 +137,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;
+ }
}
}
}