summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-05-21 11:30:43 +0200
committerGitHub <noreply@github.com>2021-05-21 11:30:43 +0200
commitb900d64fd47b1fbc1bcaa688d616da3b14ff5e22 (patch)
treea50548d1d5b33585ccfa0be6310b9f667a91d3d4 /lib/private
parentb2c2f32968ea9fcf3c28a35bc31c78e4d2caae08 (diff)
parentef6f2e68f010ff526e3ae8b8efebf83502fc0f33 (diff)
downloadnextcloud-server-b900d64fd47b1fbc1bcaa688d616da3b14ff5e22.tar.gz
nextcloud-server-b900d64fd47b1fbc1bcaa688d616da3b14ff5e22.zip
Merge pull request #26832 from nextcloud/object-close-stream-non-count
explicitly close source stream on object store upload even if count…
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 598dd4f80ae..5c792e59a3f 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -493,6 +493,9 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$stat['size'] = $size;
} else {
$this->objectStore->writeObject($urn, $stream, $mimetype);
+ if (is_resource($stream)) {
+ fclose($stream);
+ }
}
} catch (\Exception $ex) {
if (!$exists) {