Skip to content

Commit

Permalink
Merge pull request #598 from quitoque/fix/gcs-rename
Browse files Browse the repository at this point in the history
Cannot call `$this->delete($this->computePath($sourceKey))` with options['directory'] filled
  • Loading branch information
nicolasmure authored Jan 10, 2019
2 parents 1f7c4bf + de40f5e commit 63e778c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gaufrette/Adapter/GoogleCloudStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function rename($sourceKey, $targetKey)

try {
$this->service->objects->copy($this->bucket, $sourcePath, $this->bucket, $targetPath, $object);
$this->delete($sourcePath);
$this->service->objects->delete($this->bucket, $sourcePath);
} catch (\Google_Service_Exception $e) {
return false;
}
Expand Down

0 comments on commit 63e778c

Please sign in to comment.