Skip to content

Commit 4d59811

Browse files
committed
B2B-1876: New directories in pub/media do not get synced back to local filesystem from S3 Remote Storage
1 parent 19d1417 commit 4d59811

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,7 @@ public function getDirsCollection($path)
385385
*/
386386
public function getFilesCollection($path, $type = null)
387387
{
388-
if (!($this->isDirectoryAllowed($path))) {
389-
return $this->getCollection(null);
390-
}
388+
$collectFiles = $this->isDirectoryAllowed($path);
391389

392390
if ($this->_coreFileStorageDb->checkDbUsage()) {
393391
$files = $this->_storageDatabaseFactory->create()->getDirectoryFiles($path);
@@ -404,7 +402,7 @@ public function getFilesCollection($path, $type = null)
404402
)->setCollectDirs(
405403
false
406404
)->setCollectFiles(
407-
true
405+
$collectFiles
408406
)->setCollectRecursively(
409407
false
410408
)->setOrder(

0 commit comments

Comments
 (0)