fix: Make sure directories don't get overriden by entries in outline
This commit is contained in:
		
							parent
							
								
									58bafe31f9
								
							
						
					
					
						commit
						7c955c481b
					
				| 
						 | 
				
			
			@ -64,7 +64,6 @@ final class MainController extends AbstractController
 | 
			
		|||
        foreach ($finder as $file) {
 | 
			
		||||
            $current = &$tree;
 | 
			
		||||
 | 
			
		||||
            // Dunno why it is undefined, it works
 | 
			
		||||
            foreach (explode('/', $file->getRelativePath()) as $part) {
 | 
			
		||||
                if ($part === '') break;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -74,8 +73,10 @@ final class MainController extends AbstractController
 | 
			
		|||
                $current = &$current[$part];
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (!isset($current[$file->getFilenameWithoutExtension()])) {
 | 
			
		||||
                $current[$file->getFilenameWithoutExtension()] = [];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $this->render('main/index.html.twig', [
 | 
			
		||||
            'path'     => $path,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue