Skip to content

Commit

Permalink
Merge pull request #62 from hrenard/master
Browse files Browse the repository at this point in the history
fix: ensure only object versions are returned
  • Loading branch information
icewind1991 authored Nov 4, 2024
2 parents 4e06d41 + 280dc72 commit 29c4817
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Versions/S3VersionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public function getVersions($objectStore, string $urn, IUser $user, FileInfo $so
'Prefix' => $urn,
]);
$s3versions = array_values($result['Versions'] ?? []);
$s3versions = array_filter($s3versions, function (array $version) use ($urn) {
return $version['Key'] === $urn;
});
$versions = array_map(function (array $version) use ($client, $bucket, $urn, $user, $sourceFile, $backend) {
$versionId = $version['VersionId'];
$lastModified = $version['LastModified'];
Expand Down

0 comments on commit 29c4817

Please sign in to comment.