[Mono-list] Directory.CreateDirectory behaviour
Robert Jordan
robertj at gmx.net
Thu Nov 2 08:34:12 EST 2006
Colin JN Breame wrote:
> I've got a case where a Directory.CreateDirectory is silently failing. Before
> I raise I bug it might be worth testing this on the MS runtime. Could
> someone oblige?
>
> Colin.
>
> testcase:
>
> using System.IO;
> public class test_t {
> public static void Main() {
> File.CreateText("test").Close();
> Directory.CreateDirectory("test");
> Directory.CreateDirectory("test1");
> }
> }
MS.NET 1.1: It's failing silently.
MS.NET 2.0: It's failing with System.IO.IOException: Cannot create
'{0}' because a file or directory with the same name already exists.
Robert
More information about the Mono-list
mailing list