I am working on an application for Windows 7, and run some routine directory creation code:
string dirPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MyDir");
if (!Directory.Exists(dirPath))
Directory.CreateDirectory(dirPath);
The problem is that the Directory.Exists line returns true, when I can't see the directory through command line and Windows Explorer. This isn't an issue when working with Windows XP. Is there something going on with Windows 7 that I'm not aware of?
EDIT: Added Path.Combine