From c43833146ab6bed83e7ebce1a4129d0bc52bd101 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 29 Oct 2021 17:30:16 +0200 Subject: [PATCH] [core] Subtract reusable size from required disk space Fixes #362 --- legendary/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legendary/core.py b/legendary/core.py index 43d7cb0..f2f851c 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -1248,6 +1248,8 @@ class LegendaryCore: current_size = get_dir_size(install.install_path) delta = max(0, analysis.install_size - current_size) min_disk_space = delta + analysis.biggest_file_size + elif analysis.reuse_size: + min_disk_space -= analysis.reuse_size _, _, free = shutil.disk_usage(base_path) if free < min_disk_space: