Skip to content

Commit

Permalink
fix: fix moving files
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed Mar 5, 2024
1 parent 2b92271 commit c46b4d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/AutoUpdate/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ void Lip_Handler()

foreach (var dir in currentDir.EnumerateDirectories())
{
Directory.Move(dir.FullName, Path.Combine(lipuiWorkingDir, dir.Name));
var temp = Path.Combine(lipuiWorkingDir, dir.Name);
if (Directory.Exists(temp))
Directory.Delete(temp, true);
Directory.Move(dir.FullName, temp);
logger.LogInformation("Moved {dir} to {lipuiWorkingDir}", dir.Name, lipuiWorkingDir);
}

Expand Down
9 changes: 5 additions & 4 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"tooth": "github.com/lippkg/LipUI",
"version": "0.4.2",
"version": "0.4.3",
"info": {
"name": "LipUI",
"description": "A GUI client for lip",
Expand All @@ -14,7 +14,7 @@
{
"goos": "windows",
"goarch": "amd64",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.2/LipUI-win-x64.zip",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.3/LipUI-win-x64.zip",
"commands": {
"post-install": [
".autoupdate/AutoUpdate.exe --type lip_postinstall"
Expand All @@ -32,10 +32,11 @@
{
"goos": "windows",
"goarch": "arm64",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.2/LipUI-win-arm64.zip",
"asset_url": "https://github.com/lippkg/LipUI/releases/download/v0.4.3/LipUI-win-arm64.zip",
"commands": {
"post-install": [
".autoupdate/AutoUpdate.exe --type lip_postinstall"
"echo Copy files",
"IF EXIST current_lipui_path.txt (.autoupdate/AutoUpdate.exe --type lip_postinstall)"
]
},
"files": {
Expand Down

0 comments on commit c46b4d4

Please sign in to comment.