diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-08-16 12:43:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-16 12:43:53 +0200 |
commit | d94073de9226b55c4b64b6b37d2a2b5b22d7ee65 (patch) | |
tree | a6c9ead8cb67af6bbd35d5bada89b8adfafe512c /lib | |
parent | b8b81254f302302c2e5344fe35f71c920a2dd476 (diff) | |
parent | d35c4eb911f2eae21e9a7cd0bad89c60e30fda25 (diff) | |
download | nextcloud-server-d94073de9226b55c4b64b6b37d2a2b5b22d7ee65.tar.gz nextcloud-server-d94073de9226b55c4b64b6b37d2a2b5b22d7ee65.zip |
Merge pull request #38630 from joshtrichards/jr-readdir-false-false
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Common.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/PolyFill/CopyDirectory.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index a8f8c05ab54..823ff65474b 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -191,7 +191,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $this->remove($target); $dir = $this->opendir($source); $this->mkdir($target); - while ($file = readdir($dir)) { + while (($file = readdir($dir)) !== false) { if (!Filesystem::isIgnoredDir($file)) { if (!$this->copy($source . '/' . $file, $target . '/' . $file)) { closedir($dir); diff --git a/lib/private/Files/Storage/PolyFill/CopyDirectory.php b/lib/private/Files/Storage/PolyFill/CopyDirectory.php index 4b3e367da78..5fe396d97e1 100644 --- a/lib/private/Files/Storage/PolyFill/CopyDirectory.php +++ b/lib/private/Files/Storage/PolyFill/CopyDirectory.php @@ -70,7 +70,7 @@ trait CopyDirectory { protected function copyRecursive($source, $target) { $dh = $this->opendir($source); $result = true; - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (!\OC\Files\Filesystem::isIgnoredDir($file)) { if ($this->is_dir($source . '/' . $file)) { $this->mkdir($target . '/' . $file); |