Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Jan 18, 2022
1 parent d8a6f84 commit ec3797d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ func checkCfw() *cfwInfo {
ci.version = getExeVersion(info)
ci.process = item
if IsExists(fmt.Sprintf("%s/Uninstall Clash for Windows.exe", ci.rootPath)) {
ci.installVersion = true
updateCore = false
if f, err := os.Create(path.Join(ci.rootPath, "test")); err != nil {
exit(fmt.Sprintf("%s目录无权限写入, 请以管理员身份运行此程序", ci.rootPath))
} else {
f.Close()
os.Remove(path.Join(ci.rootPath, "test"))
}
ci.installVersion = true
updateCore = false
}
break
}
Expand Down

0 comments on commit ec3797d

Please sign in to comment.