mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 10:25:32 +00:00
feat(windows): review comment suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
parent
544b955570
commit
7be490a67b
2 changed files with 4 additions and 11 deletions
|
|
@ -12,9 +12,6 @@ uses
|
|||
KeymanPaths,
|
||||
OnlineUpdateCheck;
|
||||
|
||||
const
|
||||
DaysBetweenCheckingForUpdates: Integer = 7; // Days between checking for updates
|
||||
|
||||
type
|
||||
TDownloadUpdateParams = record
|
||||
TotalSize: Integer;
|
||||
|
|
@ -170,17 +167,13 @@ begin
|
|||
begin
|
||||
// TODO-WINDOWS-UPDATES: #10210 convert to error log.
|
||||
LogMessage('DoDownloadUpdates Failed to download' + Params.InstallURL);
|
||||
InstallerDownloaded := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
InstallerDownloaded := True;
|
||||
end;
|
||||
|
||||
// If installer has downloaded that is success even
|
||||
// if zero packages where downloaded.
|
||||
if InstallerDownloaded then
|
||||
// If installer has downloaded that is success even
|
||||
// if zero packages were downloaded.
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDownloadUpdate.DownloadUpdates: Boolean;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ begin
|
|||
if RegCreateKeyEx(HKEY_CURRENT_USER, PChar(SRegKey_KeymanEngine_CU), 0, NULL, KEY_ALL_ACCESS, NULL, &hk, NULL) = ERROR_SUCCESS then
|
||||
begin
|
||||
try
|
||||
if RegSetValueEx(hk, PChar(SRegValue_Update_State), 0, REG_SZ, PWideChar(UpdateStr), Length(UpdateStr) * SizeOf(Char)) = ERROR_SUCCESS then
|
||||
if RegSetValueEx(hk, PChar(SRegValue_Update_State), 0, REG_SZ, PChar(UpdateStr), (Length(UpdateStr)+1) * SizeOf(Char)) = ERROR_SUCCESS then
|
||||
begin
|
||||
Result := True;
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue