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

Ticket #1210 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

Path.standard does not convert

Reported by: un_guru Assigned to: kris
Priority: major Milestone: 0.99.8
Component: IO Version: 0.97 RC1
Keywords: FilePath Path standard Cc:

Description

import tango.io.FilePath?; import tango.io.Stdout;

void main(char[][] args) {

FilePath? path = FilePath?(args[0]); path.standard; Stdout(path.toString);

}


path is not converted as it should, and an exception is thrown about unexpected '\';

Change History

07/27/08 17:25:32 changed by kris

  • status changed from new to assigned.

thanks for this, un_guru.

This will take a while to fix properly, so I'd like to suggest perhaps looking at Path.d as a means to work around the issue. That module has free-functions which can help in this case. Will also probably change args[0] to have '/' instead

08/03/08 16:53:11 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [3843]) fixes #1210 :: Path.standard does not convert

FilePath? does automatic conversion of '\' into '/', since it represents a mutable path. Path.parse(), on the other hand, does not since it has only a char[] to deal with. Const will perhaps make a mockery of this :(