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
87
87
$ batch = [];
88
88
$ mediaDirectory = $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA );
89
89
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 )) {
95
93
continue ;
96
94
}
97
95
98
- $ batch [] = $ relativePath ;
96
+ $ batch [] = $ file ;
97
+
99
98
if (++$ i == $ this ->batchSize ) {
100
99
yield $ batch ;
101
100
$ i = 0 ;
You can’t perform that action at this time.
0 commit comments