Skip to content

Commit

Permalink
#735 typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 20, 2019
1 parent 450a1f5 commit 3e10c0c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/zold/patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ def save(file, overwrite: false, allow_negative_balance: false)
end
temp.refurbish
if temp.balance.negative? && !temp.id.root? && !allow_negative_balance
@log.info("The balance is negative, won't merge #{temp.mnemo} on top of #{wallet.mnemo}")
if wallet.exists?
@log.info("The balance is negative, won't merge #{temp.mnemo} on top of #{wallet.mnemo}")
else
@log.info("The balance is negative, won't save #{temp.mnemo}")
end
else
FileUtils.mkdir_p(File.dirname(file))
IO.write(file, IO.read(f.path))
Expand Down

0 comments on commit 3e10c0c

Please sign in to comment.