Skip to content

Commit

Permalink
fix(nsis): Ensure application name sub-folder on fresh installs. (#7552)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
p2004a authored May 31, 2023
1 parent 80a3ae8 commit e3fc9b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-goats-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(nsis): Ensure application name sub-folder on fresh installs.
8 changes: 3 additions & 5 deletions packages/app-builder-lib/templates/nsis/assistedInstaller.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@

# sanitize the MUI_PAGE_DIRECTORY result to make sure it has a application name sub-folder
Function instFilesPre
${If} ${FileExists} "$INSTDIR\*"
${StrContains} $0 "${APP_FILENAME}" $INSTDIR
${If} $0 == ""
StrCpy $INSTDIR "$INSTDIR\${APP_FILENAME}"
${endIf}
${StrContains} $0 "${APP_FILENAME}" $INSTDIR
${If} $0 == ""
StrCpy $INSTDIR "$INSTDIR\${APP_FILENAME}"
${endIf}
FunctionEnd
!endif
Expand Down

0 comments on commit e3fc9b5

Please sign in to comment.