Skip to content

Commit f273bc7

Browse files
committed
fixup! fix(AmazonS3#headObject): normalize root cache key
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent ed4a5f8 commit f273bc7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/files_external/lib/Lib/Storage/AmazonS3.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ private function invalidateCache(string $key): void {
117117
private function headObject(string $key): array|false {
118118
// Normalize only the cache key so callers can keep using the original S3 object key.
119119
$cacheKey = match ($key) {
120-
'', '.', '/' => '.',
121-
default => ltrim($key, '/'),
120+
'', '.' => '.',
121+
default => $key,
122122
};
123123
if (!isset($this->objectCache[$cacheKey])) {
124124
try {

0 commit comments

Comments
 (0)