public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM4421] Inno setup script version compare fix
Date: Tue, 2 Jul 2019 13:37:28 +0530
Message-ID: <CAM9w-_mnD3MQBMLZdY9oKwSsu6fiwWUFY9ZZob6fPUfiormy1A@mail.gmail.com> (raw)
Hi Hackers,
Attached is the patch to fix a potential issue where version compare while
upgrading will be incorrect. Currently, it is comparing strings. So while
comparing '4.9' and '4.10' it will consider '4.9' as greater.
The patch will convert the values to float and compare.
Kindly review.
--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] win.ver_compare.patch (663B, 3-win.ver_compare.patch)
download | inline diff:
diff --git a/pkg/win32/installer.iss.in b/pkg/win32/installer.iss.in
index 299d7e27..245f5d93 100644
--- a/pkg/win32/installer.iss.in
+++ b/pkg/win32/installer.iss.in
@@ -103,7 +103,8 @@ begin
begin
UpgradeMode := True;
RegQueryStringValue(HKEY_LOCAL_MACHINE,'Software\{#MyAppName}\{#MyAppVersion}', 'Version', Version);
- if Version > '{#MyAppFullVersion}' then
+ //pgAdmin version can be converted to float directly
+ if StrToFloat(Version) > StrToFloat('{#MyAppFullVersion}') then
begin
MsgBox(ExpandConstant('{cm:NewerVersionExists}' + '(v' + Version + ') is already installed' ), mbInformation, MB_OK);
Result := False;
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][RM4421] Inno setup script version compare fix
In-Reply-To: <CAM9w-_mnD3MQBMLZdY9oKwSsu6fiwWUFY9ZZob6fPUfiormy1A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox