@@ -32,26 +32,21 @@ class AmazonS3 extends Common {
3232
3333 private LoggerInterface $ logger ;
3434
35- public function needsPartFile (): bool {
36- return false ;
37- }
38-
3935 /** @var CappedMemoryCache<array|false> */
4036 private CappedMemoryCache $ objectCache ;
41-
4237 /** @var CappedMemoryCache<bool> */
4338 private CappedMemoryCache $ directoryCache ;
44-
4539 /** @var CappedMemoryCache<array> */
4640 private CappedMemoryCache $ filesCache ;
4741
4842 private IMimeTypeDetector $ mimeDetector ;
49- private ?bool $ versioningEnabled = null ;
5043 private ICache $ memCache ;
44+ private ?bool $ versioningEnabled = null ;
5145
5246 public function __construct (array $ parameters ) {
5347 parent ::__construct ($ parameters );
5448 $ this ->parseParams ($ parameters );
49+ // @todo: using `key` here may be problematic with different authentication methods and/or key rotation...
5550 $ this ->id = 'amazon::external:: ' . md5 ($ this ->params ['hostname ' ] . ': ' . $ this ->params ['bucket ' ] . ': ' . $ this ->params ['key ' ]);
5651 $ this ->initCaches ();
5752 $ this ->mimeDetector = Server::get (IMimeTypeDetector::class);
@@ -64,7 +59,7 @@ public function __construct(array $parameters) {
6459 private function normalizePath (string $ path ): string {
6560 $ path = trim ($ path , '/ ' );
6661
67- if (! $ path ) {
62+ if ($ path === '' ) {
6863 $ path = '. ' ;
6964 }
7065
@@ -704,6 +699,11 @@ public function hasUpdated(string $path, int $time): bool {
704699 }
705700 }
706701
702+ public function needsPartFile (): bool {
703+ // handled natively by the S3 backend/client integration
704+ return false ;
705+ }
706+
707707 public function writeStream (string $ path , $ stream , ?int $ size = null ): int {
708708 if ($ size === null ) {
709709 $ size = 0 ;
0 commit comments