Merge pull request #28946 from nextcloud/backport/28905/stable20

[stable20] explicitly close source stream on object store upload even if count…
This commit is contained in:
blizzz 2021-09-27 11:45:46 +02:00 committed by GitHub
commit ff475146c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -493,6 +493,9 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$stat['size'] = $size;
} else {
$this->objectStore->writeObject($urn, $stream);
if (is_resource($stream)) {
fclose($stream);
}
}
} catch (\Exception $ex) {
if (!$exists) {