]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Delete S3 versions in rmdir" 29185/head
authorVincent Petry <vincent@nextcloud.com>
Tue, 12 Oct 2021 15:06:02 +0000 (17:06 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Oct 2021 15:06:02 +0000 (17:06 +0200)
apps/files_external/lib/Lib/Storage/AmazonS3.php

index a6872f1dc3e6067c2686cc4425592489aa4b280d..1bdd11e39bd63a4f3a10ad1ab45f2b3e58ce7b3e 100644 (file)
@@ -311,35 +311,13 @@ class AmazonS3 extends \OC\Files\Storage\Common {
                                        $connection->deleteObjects([
                                                'Bucket' => $this->bucket,
                                                'Delete' => [
-                                                       'Objects' => $objects['Contents'],
+                                                       'Objects' => $objects['Contents']
                                                ]
                                        ]);
                                        $this->testTimeout();
                                }
                                // we reached the end when the list is no longer truncated
                        } while ($objects['IsTruncated']);
-
-                       do {
-                               // delete all contained versions and deletion markers
-                               $objects = $connection->listObjectVersions($params);
-                               if (isset($objects['Versions'])) {
-                                       $connection->deleteObjects([
-                                               'Bucket' => $this->bucket,
-                                               'Delete' => [
-                                                       'Objects' => $objects['Versions'],
-                                               ]
-                                       ]);
-                               }
-                               if (isset($objects['DeleteMarkers'])) {
-                                       $connection->deleteObjects([
-                                               'Bucket' => $this->bucket,
-                                               'Delete' => [
-                                                       'Objects' => $objects['DeleteMarkers'],
-                                               ]
-                                       ]);
-                               }
-                               // we reached the end when the list is no longer truncated
-                       } while ($objects['IsTruncated']);
                        $this->deleteObject($path);
                } catch (S3Exception $e) {
                        \OC::$server->getLogger()->logException($e, ['app' => 'files_external']);