Merge pull request #26832 from nextcloud/object-close-stream-non-count

explicitly close source stream on object store upload even if count…
This commit is contained in:
Julius Härtl 2021-05-21 11:30:43 +02:00 committed by GitHub
commit b900d64fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {