Skip to content

Commit 85c5df5

Browse files
committed
On Windows, remove previously installed version in the NSIS installer
1 parent 693351d commit 85c5df5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

installers/common/WindowsInstaller.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
209209
iff_ (not_ (lockfileDeleted)) $ do
210210
unsafeInject $ T.unpack $ "Abort \"" <> installDirectory <> " $(AlreadyRunning)\""
211211

212+
iff_ (fileExists "$INSTDIR") $ do
213+
detailPrint "Removing previously installed version"
214+
rmdir [Recursive] "$INSTDIR"
215+
212216
iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $
213217
rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open"
214218
case oBackend of

0 commit comments

Comments
 (0)