From ea4b391422db95157a0a0551764b4f93ea5c5ec3 Mon Sep 17 00:00:00 2001 From: Mateus Melchiades Date: Sat, 12 Aug 2023 11:43:20 -0300 Subject: [PATCH] Fix: Logic error in RunCleanUpQueue --- core/system.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/system.go b/core/system.go index 648c78dd..f9830e7d 100644 --- a/core/system.go +++ b/core/system.go @@ -265,7 +265,7 @@ func (s *ABSystem) RunCleanUpQueue(fnName string) error { } // Remove matched items in reverse order to avoid changing indices - for i := len(itemsToRemove) - 1; i <= 0; i-- { + for i := len(itemsToRemove) - 1; i >= 0; i-- { removeIdx := itemsToRemove[i] queue = append(queue[:removeIdx], queue[removeIdx+1:]...) } @@ -721,7 +721,6 @@ func (s *ABSystem) RunOperation(operation ABSystemOperation) error { } s.RunCleanUpQueue("closeChroot") - s.RemoveFromCleanUpQueue("closeChroot") err = generateABGrubConf( // *2 but we don't care about grub.cfg systemNew,