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

View File

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