From 663b999c5afc651177a498d219bb2603ee02db1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Hu=CC=88be?= Date: Tue, 23 May 2023 15:52:29 +0200 Subject: [PATCH 1/2] Fixed error "No such object" to delete folders --- Classes/Bucket/Operations.php | 10 ++++++++-- Classes/Driver/StorageDriver.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Classes/Bucket/Operations.php b/Classes/Bucket/Operations.php index fc6f5bc..f733531 100644 --- a/Classes/Bucket/Operations.php +++ b/Classes/Bucket/Operations.php @@ -133,12 +133,18 @@ public function rename($oldName, $newName) * Deletes an object. * * @param string $fileIdentifier + * @param bool $isFolder * * @return void */ - public function delete($fileIdentifier) + public function delete($fileIdentifier, $isFolder = false) { - $fileIdentifier = $this->namingHelper->normalizeFileName($fileIdentifier); + if ($isFolder === true) { + $fileIdentifier = $this->namingHelper->normalizeFolderName($fileIdentifier); + } else { + $fileIdentifier = $this->namingHelper->normalizeFileName($fileIdentifier); + } + if ($this->bucketCache instanceof BucketCache) { $this->bucketCache->clear(); } diff --git a/Classes/Driver/StorageDriver.php b/Classes/Driver/StorageDriver.php index bad378c..68a21a1 100644 --- a/Classes/Driver/StorageDriver.php +++ b/Classes/Driver/StorageDriver.php @@ -194,7 +194,7 @@ public function deleteFolder($folderIdentifier, $deleteRecursively = false) true ); foreach ($objects as $object) { - $this->bucketOperations->delete($object->getName()); + $this->bucketOperations->delete($object->getName(), $object->isFolder()); } return true; From 9a201d3f0a30028d1e6378a83dfb307cd94f8183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Hu=CC=88be?= Date: Tue, 23 May 2023 15:54:17 +0200 Subject: [PATCH 2/2] Raised version to 1.0.16 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 8c4af02..b74418a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ 'title' => 'Google Cloud Storage FAL Driver', 'description' => 'Google Cloud Storage FAL driver for TYPO3. Files can be stored in the GCS buckets.', 'category' => 'be', - 'version' => '1.0.14', + 'version' => '1.0.16', 'state' => 'stable', 'clearcacheonload' => 1, 'author' => 'Pierre Geyer',