Rescue any SystemCallError from atomic_write

This commit is contained in:
Jack Nagel 2014-09-25 14:34:28 -05:00
parent aea849109d
commit fb1250a012

View File

@ -47,7 +47,7 @@ class Keg
begin begin
first.atomic_write(s) first.atomic_write(s)
rescue Errno::EACCES rescue SystemCallError
first.ensure_writable do first.ensure_writable do
first.open("wb") { |f| f.write(s) } first.open("wb") { |f| f.write(s) }
end end