File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
app/code/Magento/MediaGallerySynchronization/Model Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,14 @@ public function execute(): \Traversable
8787 $ batch = [];
8888 $ mediaDirectory = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA );
8989
90- /** @var \SplFileInfo $file */
91- foreach ($ this ->getAssetsIterator ->execute ($ mediaDirectory ->getAbsolutePath ()) as $ file ) {
92- $ relativePath = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA )
93- ->getRelativePath ($ file ->getPathName ());
94- if (!$ this ->isApplicable ($ relativePath )) {
90+ foreach ($ mediaDirectory ->readRecursively ($ mediaDirectory ->getAbsolutePath ()) as $ file ) {
91+
92+ if (!$ this ->isApplicable ($ file )) {
9593 continue ;
9694 }
9795
98- $ batch [] = $ relativePath ;
96+ $ batch [] = $ file ;
97+
9998 if (++$ i == $ this ->batchSize ) {
10099 yield $ batch ;
101100 $ i = 0 ;
You can’t perform that action at this time.
0 commit comments