This commit is contained in:
2025-08-22 23:35:56 +08:00

View File

@@ -1026,11 +1026,14 @@ namespace CheckDownload
{ {
try try
{ {
_tempDirectory = Path.Combine( string exeDir = AppDomain.CurrentDomain.BaseDirectory;
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"Temp", _tempDirectory = Path.Combine(exeDir, "Temp");
_appName
); if (File.Exists(_tempDirectory))
{
throw new IOException($"无法创建目录,因为已存在同名文件: {_tempDirectory}");
}
if (!Directory.Exists(_tempDirectory)) if (!Directory.Exists(_tempDirectory))
{ {