Merge pull request #13826 from keymanapp/fix/windows/13767/download-filename-breadcrumb

fix(windows): add breadcrumb to download failures
This commit is contained in:
rc-swag 2025-05-08 15:06:43 +10:00 • committed by GitHub
commit ab10807e2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -59,6 +59,7 @@ uses
OnlineUpdateCheckMessages,
RegistryKeys,
Upload_Settings,
UtilCheckOnline,
utilkmshell;
procedure ErrorLogMessage(ErrorLogMessage: string);
@ -143,6 +144,7 @@ begin
else
begin
Params.Packages[i].Install := False; // Download failed but install other files
TKeymanSentryClient.Breadcrumb('error', 'Download failded for keyboard: '+ Params.Packages[i].DownloadURL, 'cli.download');
end;
end;
@ -157,6 +159,7 @@ begin
else
begin
ErrorLogMessage('DoDownloadUpdates Failed to download' + Params.InstallURL);
TKeymanSentryClient.Breadcrumb('error', 'Download failded for keyboard: '+ Params.InstallURL, 'cli.download');
end;
end;
// If there is at least one keyboard package or version of keyman downloaded then
@ -172,6 +175,11 @@ var
DownloadBackGroundSavePath : String;
ucr: TUpdateCheckResponse;
begin
if not IsOnline then
begin
TKeymanSentryClient.Breadcrumb('default', 'TDownloadUpdate: Not Online, cant execute download process.', 'cli.download');
Exit;
end;
DownloadBackGroundSavePath := IncludeTrailingPathDelimiter(TKeymanPaths.KeymanUpdateCachePath);
if TUpdateCheckStorage.LoadUpdateCacheData(ucr) then
begin

View file

@ -126,6 +126,7 @@ uses
KLog,
RegistryKeys,
utilexecute,
UtilCheckOnline,
utiluac;
const
@ -685,6 +686,12 @@ var
FResult: Boolean;
RootPath: string;
begin
// check if online
if not IsOnline then
begin
TKeymanSentryClient.Breadcrumb('default', 'Not Online, cant execute download process.', 'update');
Exit;
end;
// call separate process
RootPath := ExtractFilePath(ParamStr(0));
FResult := TUtilExecute.ShellCurrentUser(0, ParamStr(0),