diff options
Diffstat (limited to 'lib/files/view.php')
-rw-r--r-- | lib/files/view.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/files/view.php b/lib/files/view.php index 8aee12bf6fe..14de92c2005 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -500,9 +500,11 @@ class View { } else { if ($this->is_dir($path1) && ($dh = $this->opendir($path1))) { $result = $this->mkdir($path2); - while (($file = readdir($dh)) !== false) { - if (!Filesystem::isIgnoredDir($file)) { - $result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file); + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if (!Filesystem::isIgnoredDir($file)) { + $result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file); + } } } } else { |