From ed9ba8093811d5e5ea8913bcc6057804d04b0f43 Mon Sep 17 00:00:00 2001 From: Raymond LaRose Date: Tue, 27 May 2025 12:50:01 -0400 Subject: [PATCH] Bump module version to 1.4.5 and enhance Invoke-GiteaFileDownload to replace URL encoded characters in the file name --- PS-GiteaUtilities/PS-GiteaUtilities.psd1 | 2 +- PS-GiteaUtilities/PS-GiteaUtilities.psm1 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PS-GiteaUtilities/PS-GiteaUtilities.psd1 b/PS-GiteaUtilities/PS-GiteaUtilities.psd1 index 32b7833..55eefff 100644 --- a/PS-GiteaUtilities/PS-GiteaUtilities.psd1 +++ b/PS-GiteaUtilities/PS-GiteaUtilities.psd1 @@ -12,7 +12,7 @@ RootModule = 'PS-GiteaUtilities.psm1' # Version number of this module. -ModuleVersion = '1.4.4' +ModuleVersion = '1.4.5' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PS-GiteaUtilities/PS-GiteaUtilities.psm1 b/PS-GiteaUtilities/PS-GiteaUtilities.psm1 index 3e1f33e..54fbf84 100644 --- a/PS-GiteaUtilities/PS-GiteaUtilities.psm1 +++ b/PS-GiteaUtilities/PS-GiteaUtilities.psm1 @@ -461,6 +461,8 @@ Function Invoke-GiteaFileDownload { # Everything after the branch + 1 segment is considered the file path with the last segment being the file name $branchIndex = [Array]::IndexOf($pathSegments, "branch") + 2 $DownloadFilePath = $pathSegments[$branchIndex..($pathSegments.Length - 2)] -join '/' + # Replace any URL encoded characters in the file name + $DownloadFilePath = [System.Uri]::UnescapeDataString($DownloadFilePath) $DownloadFileName = $pathSegments[-1] }