File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/files_external/lib/Lib/Storage Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -263,13 +263,16 @@ private function batchDelete(?string $path = null): bool {
263263 // to delete all objects prefixed with the path.
264264 do {
265265 // instead of the iterator, manually loop over the list ...
266- $ objects = $ connection ->listObjects ($ params );
266+ $ objects = $ connection ->listObjectsV2 ($ params );
267267 // ... so we can delete the files in batches
268268 if (isset ($ objects ['Contents ' ])) {
269269 $ connection ->deleteObjects ([
270270 'Bucket ' => $ this ->bucket ,
271271 'Delete ' => [
272- 'Objects ' => $ objects ['Contents ' ]
272+ 'Objects ' => array_map (fn (array $ object ) => [
273+ 'ETag ' => $ object ['ETag ' ],
274+ 'Key ' => $ object ['Key ' ],
275+ ], $ objects ['Contents ' ])
273276 ]
274277 ]);
275278 $ this ->testTimeout ();
You can’t perform that action at this time.
0 commit comments