소스 검색

fix(upgrader): correct old executable path handling for non-Windows systems in core upgrade process

Jacky 4 일 전
부모
커밋
73553539ef
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      internal/upgrader/upgrade.go

+ 1 - 1
internal/upgrader/upgrade.go

@@ -219,7 +219,7 @@ func (u *Upgrader) PerformCoreUpgrade(tarPath string) (err error) {
 	defer updateInProgress.Store(false)
 
 	oldExe := ""
-	if runtime.GOOS != "windows" {
+	if runtime.GOOS == "windows" {
 		oldExe = filepath.Join(filepath.Dir(u.ExPath), ".nginx-ui.old."+strconv.FormatInt(time.Now().Unix(), 10))
 	}