lib/image_optim/path.rb in image_optim-0.28.0 vs lib/image_optim/path.rb in image_optim-0.29.0
- old
+ new
@@ -39,10 +39,10 @@
def copy_metadata(dst, time = false)
stat = lstat
dst.utime(stat.atime, stat.mtime) if time
begin
dst.chown(stat.uid, stat.gid)
- rescue Errno::EPERM
+ rescue Errno::EPERM, Errno::EACCES
dst.chmod(stat.mode & 0o1777)
else
dst.chmod(stat.mode)
end
end