explicitly close source stream on object store upload even if count wrapper isn't needed

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2021-04-29 17:01:19 +02:00
parent 22ba8fa78d
commit ef6f2e68f0
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 3 additions and 0 deletions

View File

@ -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) {