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] }