c# - Directory.CreateDirectory strange behaviour -


i have windows service runs separate thread function may do

if (!directory.exists(tempupdatedir))         {             directoryinfo di = directory.createdirectory(tempupdatedir);             di.refresh();             eventlog.writeentry("downloader", string.format("debug: trying create temp dir:{0}. exists?{1},{2}",tempupdatedir, directory.exists(tempupdatedir), di.exists));         } 

which not throw exceptions, directory.exists says true (inside if block) , yet there no such directory on disk, when explorer. i've seen directory created couple of times, of time directory isn't created, no exceptions thrown either.

(this service runs under local system) later on service starts program using process class , exits. program suppose work files, copy them created directory, doesn't either.

code has problems on windows 2003 server.

what the....?????????????

my guess tempupdatedir relative directory name, , doesn't refer think does. it's hard without more information though. useful log absolute path well, make easier check.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -