Skip to content

Commit c6ff6d4

Browse files
committed
Make same path copy/move a no-op for AWS S3
1 parent ea23280 commit c6ff6d4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

AwsS3V3Adapter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ private function retrievePaginatedListing(array $options): Generator
407407

408408
public function move(string $source, string $destination, Config $config): void
409409
{
410+
if ($source === $destination) {
411+
return;
412+
}
413+
410414
try {
411415
$this->copy($source, $destination, $config);
412416
$this->delete($source);
@@ -417,6 +421,10 @@ public function move(string $source, string $destination, Config $config): void
417421

418422
public function copy(string $source, string $destination, Config $config): void
419423
{
424+
if ($source === $destination) {
425+
return;
426+
}
427+
420428
try {
421429
$visibility = $config->get(Config::OPTION_VISIBILITY);
422430

AwsS3V3AdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function tearDown(): void
8181

8282
protected function setUp(): void
8383
{
84-
if (PHP_VERSION_ID < 801000) {
84+
if (PHP_VERSION_ID < 80100) {
8585
$this->markTestSkipped('AWS does not support this anymore.');
8686
}
8787

0 commit comments

Comments
 (0)