优化临时目录初始化逻辑,移除对已存在文件的检查,简化目录创建流程
This commit is contained in:
@@ -1030,11 +1030,6 @@ namespace CheckDownload
|
|||||||
|
|
||||||
_tempDirectory = Path.Combine(exeDir, "Temp");
|
_tempDirectory = Path.Combine(exeDir, "Temp");
|
||||||
|
|
||||||
if (File.Exists(_tempDirectory))
|
|
||||||
{
|
|
||||||
throw new IOException($"无法创建目录,因为已存在同名文件: {_tempDirectory}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Directory.Exists(_tempDirectory))
|
if (!Directory.Exists(_tempDirectory))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(_tempDirectory);
|
Directory.CreateDirectory(_tempDirectory);
|
||||||
|
Reference in New Issue
Block a user