digitalmars.D.bugs - Error closing BufferedFile before eof
- Piotr Fusik (9/9) May 17 2005 The following produces the error message "unable to move file pointer": ...
- Ben Hinkle (4/14) May 17 2005 odd. I can't reproduce the problem. The error is coming from a failed
- Piotr Fusik (1/3) May 17 2005 Yes. I use Windows 98SE, if that matters.
- Ben Hinkle (7/11) May 17 2005 hmm. I'll try to find a Win98 box. I was also using dmd.123 but I'm not
- Piotr Fusik (4/4) May 18 2005 The solution is to change the following line of std.stream.d:
- Ben Hinkle (3/7) May 18 2005 whew! thanks for trying that out.
The following produces the error message "unable to move file pointer": (DMD 0.122/Windows) private import std.stream; void main(char[][] args) { Stream s = new BufferedFile("foo"); // "foo" exists ubyte b; s.read(b); s.close(); }
May 17 2005
"Piotr Fusik" <Piotr_member pathlink.com> wrote in message news:d6dcr8$e1e$1 digitaldaemon.com...The following produces the error message "unable to move file pointer": (DMD 0.122/Windows) private import std.stream; void main(char[][] args) { Stream s = new BufferedFile("foo"); // "foo" exists ubyte b; s.read(b); s.close(); }odd. I can't reproduce the problem. The error is coming from a failed attempt to "seek". Are you sure those are the reproduction steps?
May 17 2005
odd. I can't reproduce the problem. The error is coming from a failed attempt to "seek". Are you sure those are the reproduction steps?Yes. I use Windows 98SE, if that matters.
May 17 2005
"Piotr Fusik" <Piotr_member pathlink.com> wrote in message news:d6delc$fqb$1 digitaldaemon.com...hmm. I'll try to find a Win98 box. I was also using dmd.123 but I'm not aware of any bug fixes that should have changed the stream behavior between dmd.122 and dmd.123. Maybe the directory and/or file read/write privledges are different from my first test. It would be useful to know if someone else reading the newsgroup can reproduce it, too.odd. I can't reproduce the problem. The error is coming from a failed attempt to "seek". Are you sure those are the reproduction steps?Yes. I use Windows 98SE, if that matters.
May 17 2005
The solution is to change the following line of std.stream.d: long diff = bufferCurPos-bufferSourcePos; to: long diff = cast(long) bufferCurPos - bufferSourcePos;
May 18 2005
"Piotr Fusik" <Piotr_member pathlink.com> wrote in message news:d6f4dr$1u6e$1 digitaldaemon.com...The solution is to change the following line of std.stream.d: long diff = bufferCurPos-bufferSourcePos; to: long diff = cast(long) bufferCurPos - bufferSourcePos;whew! thanks for trying that out.
May 18 2005