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

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/26832/head
Robin Appelman 5 years ago
parent 22ba8fa78d
commit ef6f2e68f0
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 3
      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) {

Loading…
Cancel
Save