From e52223c3ce3c871e54a0d62d1b835debc46da3d7 Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 1 Jun 2022 09:44:41 +0200 Subject: [PATCH] [core] Change disk space warning to GiB --- legendary/core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/legendary/core.py b/legendary/core.py index cecb96b..490fc74 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -1483,14 +1483,14 @@ class LegendaryCore: min_disk_space = analysis.disk_space_delta _, _, free = shutil.disk_usage(base_path) if free < min_disk_space: - free_mib = free / 1024 / 1024 - required_mib = min_disk_space / 1024 / 1024 + free_gib = free / 1024**3 + required_gib = min_disk_space / 1024**3 if ignore_space_req: results.warnings.add(f'Potentially not enough available disk space! ' - f'{free_mib:.02f} MiB < {required_mib:.02f} MiB') + f'{free_gib:.02f} GiB < {required_gib:.02f} GiB') else: results.failures.add(f'Not enough available disk space! ' - f'{free_mib:.02f} MiB < {required_mib:.02f} MiB') + f'{free_gib:.02f} GiB < {required_gib:.02f} GiB') else: results.failures.add(f'Install path "{base_path}" does not exist, make sure all necessary mounts are ' f'available. If you previously deleted the game folder without uninstalling, run '