Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

Show number of files in directory

by roundabout, Wednesday, 10 July 2024, 17:19:20 (1720631960), pushed by roundabout, Wednesday, 31 July 2024, 06:54:50 (1722408890)

Author identity: vlad <vlad.muntoiu@gmail.com>

ce8bffff1bcc8b841ce001e4382931954464d003

app.py

@@ -744,6 +744,7 @@ def repository_tree(username, repository, branch, subpath):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            info["icon"] = special_icon
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        elif os.path.isdir(path):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            info["icon"] = config.folder_icon
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        info["size"] = _("{} files").format(len(os.listdir(path)))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        elif mimetypes.guess_type(path)[0] in config.file_icons:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            info["icon"] = config.file_icons[mimetypes.guess_type(path)[0]]
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        else: