fix(nsis): check main binary name is not empty (#11000)

* Check main binary name is not empty

* Missing !=
This commit is contained in:
Tony 2024-09-14 18:33:43 +08:00 committed by GitHub
parent b13cb208a3
commit def875193a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -638,7 +638,8 @@ Section Install
; Remove old main binary if it doesn't match new main binary name
ReadRegStr $0 SHCTX "${UNINSTKEY}" "MainBinaryName"
${If} $0 != "${MAINBINARYNAME}.exe"
${If} $0 != ""
${AndIf} $0 != "${MAINBINARYNAME}.exe"
Delete "$INSTDIR\$0"
${EndIf}