瀏覽代碼

调试功能

zou.yingbin 4 年之前
父節點
當前提交
a4d5fec28c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      controllers/other/update.go

+ 2 - 1
controllers/other/update.go

@@ -70,7 +70,8 @@ func createsh() bool {
 	} else {
 		return false
 	}
-
+	// 先删除原脚本
+	os.Remove(dir + "/update.sh")
 	// 创建文件
 	if f, err := os.OpenFile(dir+"/update.sh", os.O_RDWR|os.O_CREATE, 0666); err == nil {
 		_, err = f.Write([]byte(strShell))