x
This commit is contained in:
@@ -27,7 +27,7 @@ func main() {
|
|||||||
if arg == "-d" {
|
if arg == "-d" {
|
||||||
d = true
|
d = true
|
||||||
}
|
}
|
||||||
if arg == "-r" && strings.Contains(os.Args[0], ".ready.exe") { //准备程序还原程序
|
if arg == "-r" && strings.Contains(os.Args[0], ".ready.exe") { //准备程序->原程序
|
||||||
err := utils.CopyFile(utils.ProcessName, strings.Replace(utils.ProcessName, "ready.exe", ".exe", -1))
|
err := utils.CopyFile(utils.ProcessName, strings.Replace(utils.ProcessName, "ready.exe", ".exe", -1))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
utils.Daemon("reset")
|
utils.Daemon("reset")
|
||||||
|
|||||||
+2
-2
@@ -200,11 +200,11 @@ func Daemon(str ...string) {
|
|||||||
first = str[0]
|
first = str[0]
|
||||||
}
|
}
|
||||||
args := os.Args[1:]
|
args := os.Args[1:]
|
||||||
if first == "ready" {
|
if first == "ready" { //原->准备
|
||||||
os.Args[0] = strings.Replace(os.Args[0], ".exe", ".ready.exe", -1)
|
os.Args[0] = strings.Replace(os.Args[0], ".exe", ".ready.exe", -1)
|
||||||
args = append(args, "-r")
|
args = append(args, "-r")
|
||||||
}
|
}
|
||||||
if first == "reset" {
|
if first == "reset" { //准备->原
|
||||||
os.Args[0] = strings.Replace(os.Args[0], ".ready.exe", ".exe", -1)
|
os.Args[0] = strings.Replace(os.Args[0], ".ready.exe", ".exe", -1)
|
||||||
}
|
}
|
||||||
execArgs := make([]string, 0)
|
execArgs := make([]string, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user