Fix for FreeBSD 4.9
This commit is contained in:
parent
0c3d4f81f9
commit
0dba89f427
5
NEWS
5
NEWS
|
@ -1,3 +1,8 @@
|
|||
= Version 0.5.6 =
|
||||
|
||||
Fix for FreeBSD 4.9 which returns Errno::EFBIG instead of
|
||||
Errno::EINVAL for some invalid seeks.
|
||||
|
||||
= Version 0.5.5 =
|
||||
|
||||
Fix for a problem with writing zip files that concerns only ruby 1.8.1.
|
||||
|
|
|
@ -814,6 +814,8 @@ module Zip
|
|||
io.seek(-MAX_END_OF_CENTRAL_DIRECTORY_STRUCTURE_SIZE, IO::SEEK_END)
|
||||
rescue Errno::EINVAL
|
||||
io.seek(0, IO::SEEK_SET)
|
||||
rescue Errno::EFBIG # FreeBSD 4.9 returns Errno::EFBIG instead of Errno::EINVAL
|
||||
io.seek(0, IO::SEEK_SET)
|
||||
end
|
||||
buf = io.read
|
||||
sigIndex = buf.rindex([END_OF_CENTRAL_DIRECTORY_SIGNATURE].pack('V'))
|
||||
|
|
Loading…
Reference in New Issue