diff --git a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas index a6cf9bd2e5..9fc6a24789 100644 --- a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas +++ b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas @@ -1010,19 +1010,20 @@ function InstallingState.DoInstallKeyman: Boolean; var FResult: Boolean; SavePath: String; - fileExt: String; FileName: String; FileNames: TStringDynArray; + ucr: TUpdateCheckResponse; + ucrFileName: String; found: Boolean; begin - + TUpdateCheckStorage.LoadUpdateCacheData(ucr); + ucrFileName := ucr.FileName; SavePath := IncludeTrailingPathDelimiter(TKeymanPaths.KeymanUpdateCachePath); GetFileNamesInDirectory(SavePath, FileNames); found := False; for FileName in FileNames do begin - fileExt := LowerCase(ExtractFileExt(FileName)); - if fileExt = '.exe' then + if ucrFileName = ExtractFileName(FileName) then begin found := True; break;