Don't show PHP files
This commit is contained in:
		
							parent
							
								
									c9483141d4
								
							
						
					
					
						commit
						44cb528687
					
				| 
						 | 
				
			
			@ -37,7 +37,7 @@ def index(path):
 | 
			
		|||
            render_template(
 | 
			
		||||
                "error.html",
 | 
			
		||||
                code=404,
 | 
			
		||||
                msg=f'The path "{path}" does not exist.'
 | 
			
		||||
                msg=f'The path "{path}" does not exist.',
 | 
			
		||||
            ),
 | 
			
		||||
            404,
 | 
			
		||||
        )
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +46,7 @@ def index(path):
 | 
			
		|||
 | 
			
		||||
    if os.path.isdir(internal_path):
 | 
			
		||||
        _, dirs, files = next(os.walk(internal_path))
 | 
			
		||||
        files = filter(lambda x: not x.endswith(".php"), files)
 | 
			
		||||
        files = filter(lambda x: not x.startswith("."), files)
 | 
			
		||||
        dirs = filter(lambda x: not x.startswith("."), dirs)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue