Skip to content

Commit 1805c6b

Browse files
author
Roman Hanin
committed
B2B-1610: Upgrade to Flysystem 2.0
1 parent b191c9d commit 1805c6b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

app/code/Magento/AwsS3/Driver/AwsS3.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,6 @@ public function isDirectory($path): bool
442442
if (!$path) {
443443
return true;
444444
}
445-
446-
$path = $this->normalizeRelativePath($path, true);
447-
448445
return $this->isTypeDirectory($path);
449446
}
450447

@@ -457,7 +454,7 @@ public function isDirectory($path): bool
457454
private function isTypeDirectory($path)
458455
{
459456
try {
460-
$meta = $this->metadataProvider->getMetadata($path);
457+
$meta = $this->metadataProvider->getMetadata($this->normalizeRelativePath($path, true));
461458
} catch (UnableToRetrieveMetadata $e) {
462459
return false;
463460
}

app/code/Magento/RemoteStorage/Driver/Adapter/MetadataProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ private function isDirectory($path): bool
6363
public function getMetadata(string $path): array
6464
{
6565
$metadata = $this->cache->getMetadata($path);
66-
if ($metadata && is_array($metadata)
67-
&& ($metadata['type'] == 'dir' || $this->isMetadataComplete($metadata))
68-
) {
66+
if (isset($metadata['type']) && ($metadata['type'] == 'dir' || $this->isMetadataComplete($metadata))) {
6967
return $metadata;
7068
}
7169
try {

0 commit comments

Comments
 (0)