Skip to content

Commit

Permalink
Fix: Logic error in RunCleanUpQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Aug 12, 2023
1 parent 86525a9 commit ea4b391
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:]...)
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ea4b391

Please sign in to comment.