Merge branch 'main' of https://git.54sxh.cn/Dong/CheckDownload
This commit is contained in:
13
Update.cs
13
Update.cs
@@ -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))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user