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

This commit is contained in:
Jacky 2025-05-06 22:58:24 +08:00
parent 40e8d6c40a
commit 73553539ef
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -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))
}