summaryrefslogtreecommitdiff
path: root/lib/byteback
diff options
context:
space:
mode:
authorMatthew Bloch <mattbee@yoga.home.bloch.tv>2014-11-05 16:16:34 +0000
committerMatthew Bloch <mattbee@yoga.home.bloch.tv>2014-11-05 16:16:34 +0000
commit48cb1ce1f047b2b8e65b68445c8bdac791d722ac (patch)
tree013a28f5bcda5f7e8730a332738b7c0e12462df8 /lib/byteback
parentce19e3aedb57210153cfe6babab3994149fab1c3 (diff)
Fixed a couple of silly typos.
Diffstat (limited to 'lib/byteback')
-rwxr-xr-xlib/byteback/disk_free_history.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/byteback/disk_free_history.rb b/lib/byteback/disk_free_history.rb
index ba66863..5ecc1c7 100755
--- a/lib/byteback/disk_free_history.rb
+++ b/lib/byteback/disk_free_history.rb
@@ -43,7 +43,7 @@ module Byteback
# and less than the minimum interval.
#
return nil if @list.last &&
- @list.last.fsstat.blocks_available == reading.fsstat.blocks_available
+ @list.last.fsstat.blocks_available == reading.fsstat.blocks_available &&
Time.now - @list.last.time < MINIMUM_INTERVAL
@list << reading
@@ -96,7 +96,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))