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

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2021-09-20 18:27:12 +02:00
parent a05826a2ed
commit dd9a08fa82
No known key found for this signature in database
GPG key ID: 36E3664E099D0614

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