Skip to content

Commit 62ee540

Browse files
committed
#AC-10721::Investigate the league/flysystem Composer dependencies upgrading to latest version- fixes for mftf failures
1 parent 62c5da6 commit 62ee540

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,18 @@ public function isDirectoryExists($path): bool
169169
return true;
170170
}
171171

172-
try {
173-
return $this->adapter->directoryExists($path);
174-
} catch (FlysystemFilesystemException $e) {
175-
$this->logger->error($e->getMessage());
176-
return false;
172+
$pathStats = $this->stat($path);
173+
174+
if ($pathStats['type'] == self::TYPE_DIR) {
175+
try {
176+
return $this->adapter->directoryExists($path);
177+
} catch (FlysystemFilesystemException $e) {
178+
$this->logger->error($e->getMessage());
179+
return false;
180+
}
177181
}
182+
183+
return false; // Return false if the path is not a directory
178184
}
179185

180186
/**

0 commit comments

Comments
 (0)