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.
1 parent fc96fa0 commit 2004ae4Copy full SHA for 2004ae4
apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -163,8 +163,9 @@ private function doesDirectoryExist($path) {
163
'Bucket' => $this->bucket,
164
'Prefix' => rtrim($path, '/'),
165
'MaxKeys' => 1,
166
+ 'Delimiter' => '/',
167
]);
- $this->directoryCache[$path] = $result['Contents'] || $result['CommonPrefixes'];
168
+ $this->directoryCache[$path] = ($result['Contents'][0]['Key'] === rtrim($path, '/') . '/') || $result['CommonPrefixes'];
169
} catch (S3Exception $e) {
170
if ($e->getStatusCode() === 403) {
171
$this->directoryCache[$path] = false;
0 commit comments