Merge pull request #28905 from nextcloud/backport/26832/stable21

[stable21] explicitly close source stream on object store upload even if count…
This commit is contained in:
MichaIng 2021-09-24 13:35:41 +02:00 committed by GitHub
commit ea39319d2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -494,6 +494,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) {