mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-23 00:37:41 +00:00
fix(windows): use json file name against cache folder
Be more precise by matching the file name in the cache.json file with the downloaded file in the cache folder. This will mean any older installation versions that were not correctly cleaned up will not be installed. fixes #13831
This commit is contained in:
parent
f509d1c71a
commit
2e2ec28857
1 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue