Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #591 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

tango.io.File.read() (and other IO stuff) broken on Windows

Reported by: CyberShadow Assigned to: kris
Priority: critical Milestone: 0.99.1 RC4
Component: IO Version: 0.99 RC3 Xammy
Keywords: Cc: thecybershadow@gmail.com

Description

import tango.io.File;

void main(char[][] args)
{
	File f = new File(args[1]);
	f.read();
}

Call stack:

  • tango.io.DeviceConduit.DeviceConduit.error () at ...\tango\io\DeviceConduit.d:40
  • tango.io.DeviceConduit.DeviceConduit.flush () at ...\tango\io\DeviceConduit.d:119
  • tango.io.Conduit.Conduit.close () at ...\tango\io\Conduit.d:166
  • tango.io.File.File.read () at ...\tango\io\File.d:84

Summary:

It seems that Conduit.close() unnecessarily calls sink.flush(), even when it's opened for reading. This causes an exception on Windows (as DeviceConduit?.flush() isn't implemented/overridden on Linux).

Change History

08/26/07 01:09:26 changed by larsivi

  • owner changed from sean to kris.

08/26/07 01:10:50 changed by CyberShadow

  • component changed from Core Functionality to IO.

08/26/07 01:49:52 changed by kris

Doh!

08/26/07 15:23:09 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from 1.0 to 0.99.1 RC4.

fixed in [2505]

thx!