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 62c5da6 commit 62ee540Copy full SHA for 62ee540
app/code/Magento/AwsS3/Driver/AwsS3.php
@@ -169,12 +169,18 @@ public function isDirectoryExists($path): bool
169
return true;
170
}
171
172
- try {
173
- return $this->adapter->directoryExists($path);
174
- } catch (FlysystemFilesystemException $e) {
175
- $this->logger->error($e->getMessage());
176
- return false;
+ $pathStats = $this->stat($path);
+
+ if ($pathStats['type'] == self::TYPE_DIR) {
+ try {
+ return $this->adapter->directoryExists($path);
177
+ } catch (FlysystemFilesystemException $e) {
178
+ $this->logger->error($e->getMessage());
179
+ return false;
180
+ }
181
182
183
+ return false; // Return false if the path is not a directory
184
185
186
/**
0 commit comments