]> err.no Git - pwstore/commitdiff
Deleting members while we do an .each on an array is not good
authorPeter Palfrader <peter@palfrader.org>
Fri, 16 Jan 2009 21:46:08 +0000 (22:46 +0100)
committerPeter Palfrader <peter@palfrader.org>
Fri, 16 Jan 2009 21:46:08 +0000 (22:46 +0100)
pws

diff --git a/pws b/pws
index b58ea387d2299a35ac7975f6adb8276e9e134ce5..e73d036463c305dc45db88b68c003efaf346f1d0 100755 (executable)
--- a/pws
+++ b/pws
@@ -326,7 +326,8 @@ class GroupConfig
         group['keys'] = [] unless group['keys'] 
 
         still_contains_groups = false
-        group['members_to_do'].each do |member|
+        group['members_to_do'].clone.each do |member|
+          puts "member: #{member}"
           if is_group(member)
             if @groups[member]['members_to_do'].size == 0
               group['keys'].concat @groups[member]['keys']