星空&逆行者:
[code=plain]
string strCachePath = strStartupPath + @"\Cache";
bool bFirstrun = !System.IO.Directory.Exists(strCachePath);
if (bFirstrun)
{
System.IO.Directory.CreateDirectory(strCachePath);
}
//该段代码bool判断错误,会导致每次启动,永远自增一个Cache文件夹,正确的应该是这样
string strCachePath = strStartupPath + @"\Cache";
bool bFirstrun = !System.IO.Directory.Exists(strCachePath);
if (!bFirstrun)
{
System.IO.Directory.CreateDirectory(strCachePath);
}
[/code]