From 69ab26f1db92240d9f22f4048100838ac417e432 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 12 Jul 2021 08:37:27 -0400 Subject: [PATCH] Use modulus to better distribute use of archive disks vs. index https://github.com/ericaltendorf/plotman/issues/847 --- src/plotman/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plotman/archive.py b/src/plotman/archive.py index 59a9a9e6..2d542e60 100644 --- a/src/plotman/archive.py +++ b/src/plotman/archive.py @@ -240,7 +240,7 @@ def archive(dir_cfg: configuration.Directories, arch_cfg: configuration.Archivin available = [(d, space) for (d, space) in archdir_freebytes.items() if space > (chosen_plot_size + free_space_margin)] if len(available) > 0: - index = min(arch_cfg.index, len(available) - 1) + index = arch_cfg.index % (len(available) - 1) (archdir, freespace) = sorted(available)[index] if not archdir: