File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
internal_filesystem/builtin/apps/com.example.launcher/assets Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,12 @@ def load_icon(icon_path):
4545# Check and collect unique subdirectories from existing directories
4646for dir_path in [apps_dir , apps_dir_builtin ]:
4747 try :
48- # Verify directory exists and is a directory
49- if uos .stat (dir_path )[0 ] & 0x4000 :
50- # Iterate over subdirectories
51- for d in uos .listdir (dir_path ):
48+ if uos .stat (dir_path )[0 ] & 0x4000 : # Verify directory exists and is a directory
49+ for d in uos .listdir (dir_path ): # Iterate over subdirectories
5250 full_path = f"{ dir_path } /{ d } "
53- # Check if it's a directory
54- if uos .stat (full_path )[0 ] & 0x4000 :
55- # Extract base name (e.g., 'example' from '/apps/example')
56- base_name = d
57- # Only add if base name hasn't been seen
58- if base_name not in seen_base_names :
51+ if uos .stat (full_path )[0 ] & 0x4000 : # Check if it's a directory
52+ base_name = d # Extract base name (e.g., 'example' from '/apps/example')
53+ if base_name not in seen_base_names : # Only add if base name hasn't been seen (no duplicates)
5954 app_dirs .append (full_path )
6055 seen_base_names .add (base_name )
6156 except OSError :
You can’t perform that action at this time.
0 commit comments