From fb11a14b816f3bbbcdb3bacc745b3e86ad7a4ba8 Mon Sep 17 00:00:00 2001 From: Nick Sagona Date: Tue, 28 Nov 2023 17:15:27 -0600 Subject: [PATCH] Patch S3 md5 issue --- src/Adapter/S3.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Adapter/S3.php b/src/Adapter/S3.php index 43f09e2..27c9859 100644 --- a/src/Adapter/S3.php +++ b/src/Adapter/S3.php @@ -466,8 +466,8 @@ public function md5File(string $filename): string|bool { if (file_exists($this->directory . DIRECTORY_SEPARATOR . $this->scrub($filename))) { $fileObject = $this->client->getObject([ - 'Bucket' => str_replace('s3://', '', $this->directory), - 'Key' => $this->scrub($filename), + 'Bucket' => str_replace('s3://', '', $this->baseDirectory), + 'Key' => str_replace($this->baseDirectory . '/', '', $this->directory . '/') . $this->scrub($filename), ]); return (isset($fileObject['ETag'])) ? str_replace('"', '', $fileObject['ETag']) : false;