lib/zold/patch.rb in zold-0.14.52 vs lib/zold/patch.rb in zold-0.14.53

- old
+ new

@@ -21,11 +21,10 @@ # SOFTWARE. require_relative 'log' require_relative 'wallet' require_relative 'signature' -require_relative 'atomic_file' # Patch. # # Author:: Yegor Bugayenko (yegor256@gmail.com) # Copyright:: Copyright (c) 2018 Yegor Bugayenko @@ -118,19 +117,19 @@ # Returns TRUE if the file was actually modified def save(file, overwrite: false) raise 'You have to join at least one wallet in' if @id.nil? before = '' - before = AtomicFile.new(file).read if File.exist?(file) + before = File.read(file) if File.exist?(file) wallet = Wallet.new(file) wallet.init(@id, @key, overwrite: overwrite, network: @network) File.open(file, 'a') do |f| @txns.each do |txn| f.print "#{txn}\n" end end wallet.refurbish - after = AtomicFile.new(file).read + after = File.read(file) before != after end end end