commit c255397f39e84344497433969e66af74442055e6
parent b5347107088bd9ff4b36a396a0ecacef377fd00c
Author: William Morgan <william@twitter.com>
Date: Wed, 19 Jan 2011 09:13:32 -0800
bugfix in backup yaml saving
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -103,7 +103,7 @@ module Redwood
if backup
backup_fn = fn + '.bak'
- unless File.exists?(backup_fn) && File.size(fn) == 0
+ if File.exists?(fn) && File.size(fn) > 0
File.open(backup_fn, "w", mode) do |f|
File.open(fn, "r") { |old_f| FileUtils.copy_stream old_f, f }
f.fsync