1 Commits
1.5.4 ... main

View File

@@ -475,9 +475,6 @@ Function Invoke-GiteaFileDownload {
$DownloadFileName = $pathSegments[-1]
}
$DownloadFilePath = [System.Uri]::UnescapeDataString($DownloadFilePath)
$DownloadFileName = [System.Uri]::UnescapeDataString($DownloadFileName)
if ($PreserveRelativePath -and $outputPath) {
# If PreserveRelativePath is used, set up the directory structure
Write-Verbose "Preserving relative path structure for: $DownloadFileName"
@@ -516,6 +513,8 @@ Function Invoke-GiteaFileDownload {
# Normalize path separators
$fileOutputPath = $fileOutputPath.Replace("/", [System.IO.Path]::DirectorySeparatorChar)
# Replace any URL encoded characters in the file output path
$fileOutputPath = [System.Uri]::UnescapeDataString($fileOutputPath)
Write-Verbose "Output path: $fileOutputPath"