1 Apr 2004 02:39
IO.seek behaving strangely on FreeBSD 4.9
Travis Whitton <whitton <at> atlantic.net>
2004-04-01 00:39:24 GMT
2004-04-01 00:39:24 GMT
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 <at> aop:~$ uname -a
FreeBSD aop.intranet 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4
#0: Wed Mar 17 16:55:09 EST 2004
root <at> aop.intranet:/usr/obj/usr/src/sys/MYKERNEL i386
travis <at> aop:~$ ruby -v
ruby 1.8.1 (2003-12-25) [i386-freebsd4]
travis <at> 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 <at> 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
(Continue reading)
--
Simon Strandgaard
RSS Feed