Skip to content

Commit

Permalink
修正更新BUG。
Browse files Browse the repository at this point in the history
  • Loading branch information
OdysseusYuan committed Apr 1, 2023
1 parent cfc1475 commit dc007c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions LKY_OfficeTools/Lib/Lib_AppUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

using LKY_OfficeTools.Common;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
Expand Down Expand Up @@ -196,7 +195,7 @@ internal static bool Check()

//若旧的 exe 文件名和默认 exe 文件名不一致时,将自身 exe 文件 move 到 Trash 目录。
//解决用户修改旧 exe 文件名,复制新文件后,会出现两个 exe 的情况。
if (AppPath.Executer != (AppPath.ExecuteDir + $"\\{AppAttribute.AppFilename}"))
if (Path.GetFileName(AppPath.Executer) != AppAttribute.AppFilename)
{
string exe_moveto = AppPath.Documents.Update.UpdateTrash + $"\\{DateTime.Now.ToFileTime()}.old";
Directory.CreateDirectory(Path.GetDirectoryName(exe_moveto)); //创建目录
Expand Down

0 comments on commit dc007c3

Please sign in to comment.