Rescue any SystemCallError from atomic_write
This commit is contained in:
parent
aea849109d
commit
fb1250a012
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user