We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents efe68d0 + e66e8ba commit c5d8240Copy full SHA for c5d8240
apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -550,18 +550,20 @@ public function touch($path, $mtime = null) {
550
];
551
552
try {
553
- if (!$this->file_exists($path)) {
554
- $mimeType = $this->mimeDetector->detectPath($path);
555
- $this->getConnection()->putObject([
556
- 'Bucket' => $this->bucket,
557
- 'Key' => $this->cleanKey($path),
558
- 'Metadata' => $metadata,
559
- 'Body' => '',
560
- 'ContentType' => $mimeType,
561
- 'MetadataDirective' => 'REPLACE',
562
- ]);
563
- $this->testTimeout();
+ if ($this->file_exists($path)) {
+ return false;
564
}
+
+ $mimeType = $this->mimeDetector->detectPath($path);
+ $this->getConnection()->putObject([
+ 'Bucket' => $this->bucket,
+ 'Key' => $this->cleanKey($path),
+ 'Metadata' => $metadata,
+ 'Body' => '',
+ 'ContentType' => $mimeType,
+ 'MetadataDirective' => 'REPLACE',
565
+ ]);
566
+ $this->testTimeout();
567
} catch (S3Exception $e) {
568
$this->logger->error($e->getMessage(), [
569
'app' => 'files_external',
0 commit comments