fix(windows): decode uri for packageid filename

The uri for the downloaded filename need is decoded
to turn %20 back to spaces etc. For the download location
it encoding is maintained.
This commit is contained in:
rc-swag 2024-04-03 10:27:46 +10:00
parent 6db53aee7a
commit a273cbfd58
2 changed files with 4 additions and 2 deletions

View file

@ -39,6 +39,7 @@ uses
UfrmInstallKeyboard,
Upload_Settings,
utildir,
IdURI,
utilfiletypes;
{ TKeymanProtocolHandler }
@ -84,7 +85,7 @@ begin
// TODO: refactor into separate unit together with code from UfrmInstallKeyboardFromWeb
FTempDir := IncludeTrailingPathDelimiter(CreateTempPath); // I1679
try
FDownloadFilename := FTempDir + PackageID + Ext_PackageFile;
FDownloadFilename := FTempDir + TIdURI.URLDecode(PackageID) + Ext_PackageFile;
FDownloadURL := KeymanCom_Protocol_Server + URLPath_PackageDownload(PackageID, BCP47, False);
frmDownloadProgress := TfrmDownloadProgress.Create(nil);

View file

@ -91,6 +91,7 @@ uses
Upload_Settings,
utilfiletypes,
utildir,
IdURI,
utilexecute,
VersionInfo;
@ -215,7 +216,7 @@ var
begin
FTempDir := IncludeTrailingPathDelimiter(CreateTempPath); // I1679
try
FDownloadFilename := FTempDir + PackageID + Ext_PackageFile;
FDownloadFilename := FTempDir + TIdURI.URLDecode(PackageID) + Ext_PackageFile;
FDownloadURL := KeymanCom_Protocol_Server + URLPath_PackageDownload(PackageID, BCP47, False);
frmDownloadProgress := TfrmDownloadProgress.Create(Self);