aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-06-21 18:44:05 +0200
committerGitHub <noreply@github.com>2022-06-21 18:44:05 +0200
commit2e10378052722c5affca71e60d926962be5d878c (patch)
treea302c3512b709ec303007577d488586521ae8d58 /lib
parent632d4d9a6e2baafb68bcc3c546d1ee0699c23e63 (diff)
parent8190441335aaa01baed01a3984c0a153126a5d0f (diff)
downloadnextcloud-server-2e10378052722c5affca71e60d926962be5d878c.tar.gz
nextcloud-server-2e10378052722c5affca71e60d926962be5d878c.zip
Merge pull request #31475 from nextcloud/kofemann-patch-1
files: close open directory file descriptor on error path
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Common.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 3c970ee75f5..a7bc44e10e2 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -228,6 +228,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
while ($file = readdir($dir)) {
if (!Filesystem::isIgnoredDir($file)) {
if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) {
+ closedir($dir);
return false;
}
}