mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 17:24:45 +00:00
fix: Use du -P for accurate size calculation and add timeouts to channel sends to prevent blocking.
This commit is contained in:
@@ -626,7 +626,7 @@ check_ios_device_backups() {
|
||||
if [[ -d "$backup_dir" ]]; then
|
||||
local backup_kb=$(get_path_size_kb "$backup_dir")
|
||||
if [[ -n "${backup_kb:-}" && "$backup_kb" -gt 102400 ]]; then
|
||||
local backup_human=$(command du -sh "$backup_dir" 2> /dev/null | awk '{print $1}')
|
||||
local backup_human=$(command du -shP "$backup_dir" 2> /dev/null | awk '{print $1}')
|
||||
if [[ -n "$backup_human" ]]; then
|
||||
note_activity
|
||||
echo -e " ${YELLOW}${ICON_WARNING}${NC} iOS backups: ${GREEN}${backup_human}${NC}${GRAY}, Path: $backup_dir${NC}"
|
||||
|
||||
Reference in New Issue
Block a user