Skip to content

Commit e3fc9b5

Browse files
authored
fix(nsis): Ensure application name sub-folder on fresh installs. (#7552)
* fix(nsis): Ensure application name sub-folder on fresh installs. During the first program install when the selected directory doesn't exist, it's not enforced that the path contains the application name as a sub-folder. On subsequent installs e.g. on-update, that condition is enforced though, which creates a new installation in sub-folder. Fixes: #6885
1 parent 80a3ae8 commit e3fc9b5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.changeset/two-goats-shop.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": patch
3+
---
4+
5+
fix(nsis): Ensure application name sub-folder on fresh installs.

packages/app-builder-lib/templates/nsis/assistedInstaller.nsh

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131

3232
# sanitize the MUI_PAGE_DIRECTORY result to make sure it has a application name sub-folder
3333
Function instFilesPre
34-
${If} ${FileExists} "$INSTDIR\*"
35-
${StrContains} $0 "${APP_FILENAME}" $INSTDIR
36-
${If} $0 == ""
37-
StrCpy $INSTDIR "$INSTDIR\${APP_FILENAME}"
38-
${endIf}
34+
${StrContains} $0 "${APP_FILENAME}" $INSTDIR
35+
${If} $0 == ""
36+
StrCpy $INSTDIR "$INSTDIR\${APP_FILENAME}"
3937
${endIf}
4038
FunctionEnd
4139
!endif

0 commit comments

Comments
 (0)