File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -262,11 +262,16 @@ private function createFileIterator(string $dir): Nette\Utils\Finder
262
262
263
263
$ iterator = Nette \Utils \Finder::findFiles ($ acceptFiles )
264
264
->filter (function (SplFileInfo $ file ) use (&$ disallow ) {
265
- return !isset ($ disallow [str_replace ('\\' , '/ ' , $ file ->getRealPath ())]);
265
+ return $ file ->getRealPath () === false
266
+ ? true
267
+ : !isset ($ disallow [str_replace ('\\' , '/ ' , $ file ->getRealPath ())]);
266
268
})
267
269
->from ($ dir )
268
270
->exclude ($ ignoreDirs )
269
271
->filter ($ filter = function (SplFileInfo $ dir ) use (&$ disallow ) {
272
+ if ($ dir ->getRealPath () === false ) {
273
+ return true ;
274
+ }
270
275
$ path = str_replace ('\\' , '/ ' , $ dir ->getRealPath ());
271
276
if (is_file ("$ path/netterobots.txt " )) {
272
277
foreach (file ("$ path/netterobots.txt " ) as $ s ) {
You can’t perform that action at this time.
0 commit comments