T
Travis Whitton
Hi,
Initially I thought that this was a bug with rubyzip, but it appears that
something is wrong with IO.seek on FreeBSD 4.9 (at least on my system).
travis@aop:~$ uname -a
FreeBSD aop.intranet 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4
#0: Wed Mar 17 16:55:09 EST 2004
(e-mail address removed):/usr/obj/usr/src/sys/MYKERNEL i386
travis@aop:~$ ruby -v
ruby 1.8.1 (2003-12-25) [i386-freebsd4]
travis@aop:~$ cat badseek.rb
f = File.new("somefile.txt", "w") # make an empty file
f.close
f = File.new("somefile.txt")
f.seek(-1, IO::SEEK_END)
f.read
travis@aop:~$ ruby badseek.rb
badseek.rb:3:in `seek': File too large - somefile.txt (Errno::EFBIG)
from badseek.rb:3
I know that the seek index is invalid, so I should get Errno::EINVAL, but why
am I getting Errno:EFBIG? This seems to be causing a problem preventing me
from using rubyzip on my machine when it tries to do a valid seek on a zipfile.
Thanks,
Travis Whitton
Initially I thought that this was a bug with rubyzip, but it appears that
something is wrong with IO.seek on FreeBSD 4.9 (at least on my system).
travis@aop:~$ uname -a
FreeBSD aop.intranet 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4
#0: Wed Mar 17 16:55:09 EST 2004
(e-mail address removed):/usr/obj/usr/src/sys/MYKERNEL i386
travis@aop:~$ ruby -v
ruby 1.8.1 (2003-12-25) [i386-freebsd4]
travis@aop:~$ cat badseek.rb
f = File.new("somefile.txt", "w") # make an empty file
f.close
f = File.new("somefile.txt")
f.seek(-1, IO::SEEK_END)
f.read
travis@aop:~$ ruby badseek.rb
badseek.rb:3:in `seek': File too large - somefile.txt (Errno::EFBIG)
from badseek.rb:3
I know that the seek index is invalid, so I should get Errno::EINVAL, but why
am I getting Errno:EFBIG? This seems to be causing a problem preventing me
from using rubyzip on my machine when it tries to do a valid seek on a zipfile.
Thanks,
Travis Whitton