Directory.Exists(path) creates a directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I"m using this method to determine if a folder\directory exists:
Directory.Exists(path)
and as I call it, it creates (by itself - even though the folder doesn't
exists) a new folder according to tha path I passed it and returns 'true'!
How could that be?
 
Coulnd't reproduce the behaviour. Can you post the relevant code?

I"m using this method to determine if a folder\directory exists:
Directory.Exists(path)
and as I call it, it creates (by itself - even though the folder doesn't
exists) a new folder according to tha path I passed it and returns 'true'!
How could that be?
 
<%@ Import Namespace="System.IO" %>


dim mVirtualPath as string = "c:\txt"
If not Directory.Exists(mVirtualPath)
'doing nothing yet
Else
'jumps right here after the folder has been created
End If
 
solved, don't know how or why


Strig said:
<%@ Import Namespace="System.IO" %>


dim mVirtualPath as string = "c:\txt"
If not Directory.Exists(mVirtualPath)
'doing nothing yet
Else
'jumps right here after the folder has been created
End If
 
Back
Top