Re: Intermittent Incorrect Result on System.IO.Directory.Exists

Brady Kelly <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
Per:

> This sounds exactly like the problem you had back in May:
> 
> > Date: Mon, 19 May 2008 19:42:33 +0200
> > From: Brady Kelly <[email protected]>
> > Subject: [DOTNET-CLR] Directory Ops Behaving Asynchronous
> >
> > I have the following code execute:
> >             if (Directory.Exists(exportFolder))
> >             {
> >                 Directory.Delete(exportFolder, true);
> >             }
> >             Directory.CreateDirectory(exportFolder);
> > [...]
> > Occassionally, about 1 in 20 tests I run in the IDE, PerformExport
> > fails because exportFolder does not exist. How can it not exist if
> > I create it and no exception is thrown? I can only suspect that the
> > Directory code is not truly synchronous, and has not completed
> > before PerformExport executes.
> 
> How did that work out?

It disappeared.

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.