summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthew Bloch <mattbee@yoga.home.bloch.tv>2014-11-05 18:54:12 +0000
committerMatthew Bloch <mattbee@yoga.home.bloch.tv>2014-11-05 18:54:12 +0000
commit8a12e8e9d1a06c4b071a46966bd43c44c8136faa (patch)
tree240ae6f653669c73adc9a5cf4f2a2b6c97ab5029 /lib
parentaa9d3eba052a45e57b2ad0362f0671a5a4b471cd (diff)
Usability and bug fixes for byteback-prune, including --prune-force flag.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/byteback/disk_free_history.rb3
1 files changed, 1 insertions, 2 deletions
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))