From 8a12e8e9d1a06c4b071a46966bd43c44c8136faa Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Wed, 5 Nov 2014 18:54:12 +0000 Subject: Usability and bug fixes for byteback-prune, including --prune-force flag. --- lib/byteback/disk_free_history.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/byteback') diff --git a/lib/byteback/disk_free_history.rb b/lib/byteback/disk_free_history.rb index 5ecc1c7..daa68bc 100755 --- a/lib/byteback/disk_free_history.rb +++ b/lib/byteback/disk_free_history.rb @@ -70,7 +70,6 @@ module Byteback value_from_reading.call(reading) - value_from_reading.call(later_reading) total += difference - p difference end break if reading.time < earliest readings += 1 @@ -96,7 +95,7 @@ module Byteback def save! list.shift while Time.now - list.first.time > MAXIMUM_AGE - tmp = "@{history_file}.#{$$}.#{rand(9999999999)}" + tmp = "#{@history_file}.#{$$}.#{rand(9999999999)}" begin File.open(tmp, "w") do |fh| fh.write(Marshal.dump(list)) -- cgit v1.2.1