File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -587,17 +587,21 @@ Function .onInit
587587
588588
589589 ; --- PORTABLE MODE --- Auto-detect portable mode during updates.
590- ; If the target directory already has a valid portable marker file, preserve
591- ; portable mode so the Tauri updater works without needing /PORTABLE.
592- ; We validate the magic string to avoid false-positives from stale empty files
593- ; left by scoop's NSIS extraction (dl.7z side-effect) .
590+ ; Preserve portable installs that use either the current magic-string marker
591+ ; or the legacy empty marker created by older Handy releases. Require Data/
592+ ; for the legacy empty-marker case so stale scoop side-effect files do not
593+ ; accidentally opt an updater run into portable mode .
594594 ${If} $PortableMode <> 1
595+ ${AndIf} $UpdateMode = 1
595596 ${AndIf} ${FileExists} " $INSTDIR\portable"
596597 FileOpen $1 " $INSTDIR\portable" r
597598 FileRead $1 $2
598599 FileClose $1
599600 ${If} $2 == " Handy Portable Mode"
600601 StrCpy $PortableMode 1
602+ ${OrIf} $2 == " "
603+ ${AndIf} ${FileExists} " $INSTDIR\Data"
604+ StrCpy $PortableMode 1
601605 ${EndIf}
602606 ${EndIf}
603607
You can’t perform that action at this time.
0 commit comments