From c5402f457530577999d1adc1715c76e742ad8aa9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 19 Aug 2013 12:04:53 +0200 Subject: use strict equals in readdir loops to prevent issues with '0' files --- lib/files/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/files/view.php') diff --git a/lib/files/view.php b/lib/files/view.php index c9727fe4984..bb737f19ef8 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -499,7 +499,7 @@ class View { } else { if ($this->is_dir($path1) && ($dh = $this->opendir($path1))) { $result = $this->mkdir($path2); - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (!Filesystem::isIgnoredDir($file)) { $result = $this->copy($path1 . '/' . $file, $path2 . '/' . $file); } -- cgit v1.2.3