Skip to content

Commit 584e421

Browse files
Merge pull request #63864 from nextcloud/backport/63849/stable35
[stable35] fix(ObjectStorePreviewStorage): Close count stream wrapper
2 parents 975fbf0 + cb4f910 commit 584e421

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/private/Preview/Storage/ObjectStorePreviewStorage.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public function writePreview(Preview $preview, mixed $stream): int {
5656
$store->writeObject($urn, $countStream);
5757
} catch (\Exception $exception) {
5858
throw new NotPermittedException('Unable to save preview to object store', previous: $exception);
59+
} finally {
60+
if (is_resource($countStream)) {
61+
fclose($countStream);
62+
}
5963
}
6064
return $size;
6165
}

0 commit comments

Comments
 (0)