[Mono-dev] System.IO.Path: inconsistent paths from Windows clients

Robert Jordan robertj at gmx.net
Mon Jun 26 11:41:42 EDT 2006


subscription.sapi wrote:
> I've different behavior in ms.net framework and mono framework when I
> use methods in "System.IO.Path" class.
> 
> Test Case Description:

Next time please post the source code of your test case
along with a system description (Mono version, OS, etc.).

> MONO:
> 
> Input path: D:\R&D\doc\jd\StandardJD.doc
> 
> Output path: 
> 
> Path.GetFileName
> D:\R&D\doc\jd\StandardJD.doc
> Path.GetDirectoryName                       
> Path.GetFileNameWithoutExtension      D:\R&D\doc\jd\StandardJD
> Path.GetPathRoot                               

I cannot reproduce this with Mono 1.1.15 under Windows,
so you're probably testing under Linux.

The directory separator under Linux is '/' or
Path.DirectorySeparatorChar, so you have to flip the '\'.

Robert




More information about the Mono-devel-list mailing list