Skip to content

Commit

Permalink
Make same path copy/move a no-op for AWS S3
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Aug 17, 2024
1 parent ea23280 commit c6ff6d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions AwsS3V3Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ private function retrievePaginatedListing(array $options): Generator

public function move(string $source, string $destination, Config $config): void
{
if ($source === $destination) {
return;
}

try {
$this->copy($source, $destination, $config);
$this->delete($source);
Expand All @@ -417,6 +421,10 @@ public function move(string $source, string $destination, Config $config): void

public function copy(string $source, string $destination, Config $config): void
{
if ($source === $destination) {
return;
}

try {
$visibility = $config->get(Config::OPTION_VISIBILITY);

Expand Down
2 changes: 1 addition & 1 deletion AwsS3V3AdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function tearDown(): void

protected function setUp(): void
{
if (PHP_VERSION_ID < 801000) {
if (PHP_VERSION_ID < 80100) {
$this->markTestSkipped('AWS does not support this anymore.');
}

Expand Down

0 comments on commit c6ff6d4

Please sign in to comment.