mirror of
https://github.com/tw93/Mole.git
synced 2026-02-07 08:50:38 +00:00
optimize code structure and reduce duplication
This commit is contained in:
@@ -217,8 +217,8 @@ scan_applications() {
|
||||
local app_size="N/A"
|
||||
local app_size_kb="0"
|
||||
if [[ -d "$app_path" ]]; then
|
||||
# Get size in KB, then format for display (single du call)
|
||||
app_size_kb=$(du -sk "$app_path" 2> /dev/null | awk '{print $1}' || echo "0")
|
||||
# Get size in KB, then format for display
|
||||
app_size_kb=$(get_path_size_kb "$app_path")
|
||||
app_size=$(bytes_to_human "$((app_size_kb * 1024))")
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user