From c6ab7827e7014dcaa4dccbc3d82ac045c6ca8c7d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 9 Mar 2021 19:26:22 +0200 Subject: [PATCH] Fixed incorrect size of unnecessary data // Resolve #3830 --- platformio/maintenance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 0e101339..e22f8407 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -349,8 +349,8 @@ def check_prune_system(): if threshold_mb <= 0: return - unnecessary_mb = calculate_unnecessary_system_data() / 1024 - if unnecessary_mb < threshold_mb: + unnecessary_size = calculate_unnecessary_system_data() + if (unnecessary_size / 1024) < threshold_mb: return terminal_width, _ = click.get_terminal_size() @@ -360,6 +360,6 @@ def check_prune_system(): "We found %s of unnecessary PlatformIO system data (temporary files, " "unnecessary packages, etc.).\nUse `pio system prune --dry-run` to list " "them or `pio system prune` to save disk space." - % fs.humanize_file_size(unnecessary_mb), + % fs.humanize_file_size(unnecessary_size), fg="yellow", )