diff options
author | Robin Appelman <robin@icewind.nl> | 2021-04-29 17:01:19 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-04-29 17:01:19 +0200 |
commit | ef6f2e68f010ff526e3ae8b8efebf83502fc0f33 (patch) | |
tree | 90f4c1d53b5efbf817149cfe70551fd62ed181b4 /lib/private | |
parent | 22ba8fa78d704810f793511964093bb8dc859d24 (diff) | |
download | nextcloud-server-ef6f2e68f010ff526e3ae8b8efebf83502fc0f33.tar.gz nextcloud-server-ef6f2e68f010ff526e3ae8b8efebf83502fc0f33.zip |
explicitly close source stream on object store upload even if count wrapper isn't needed
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 598dd4f80ae..5c792e59a3f 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/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) { |