lib/dreamback/backup.rb in dreamback-0.0.5 vs lib/dreamback/backup.rb in dreamback-0.0.6

- old
+ new

@@ -172,9 +172,14 @@ month_hash.each do |month, dates| keep << dates.shift[0] unless dates.empty? end keep.sort!.compact! - { :keep => keep, :delete => folders - keep} + + # Convert elements from ["dreamback.20120701", "20120701"] to "dreamback.20120701" + keep_clean = keep.map {|folder| folder.shift} + delete = (folders - keep).map {|folder| folder.shift} + + { :keep => keep_clean, :delete => delete} end end end \ No newline at end of file