diff --git a/src/chocolatey.resources/chocolatey.resources.csproj b/src/chocolatey.resources/chocolatey.resources.csproj index 226eecc882..43c4e25c67 100644 --- a/src/chocolatey.resources/chocolatey.resources.csproj +++ b/src/chocolatey.resources/chocolatey.resources.csproj @@ -123,7 +123,7 @@ - + diff --git a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 index 5a95852a89..cd18453165 100644 --- a/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-ChocolateyWebFile.ps1 @@ -129,7 +129,7 @@ param( try { $fileDirectory = [System.IO.Path]::GetDirectoryName($fileFullPath) $originalFileName = [System.IO.Path]::GetFileName($fileFullPath) - $fileFullPath = Get-FileName -url $url -defaultName $originalFileName + $fileFullPath = Get-WebFileName -url $url -defaultName $originalFileName $fileFullPath = Join-Path $fileDirectory $fileFullPath $fileFullPath = [System.IO.Path]::GetFullPath($fileFullPath) } catch { diff --git a/src/chocolatey.resources/helpers/functions/Get-FileName.ps1 b/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 similarity index 95% rename from src/chocolatey.resources/helpers/functions/Get-FileName.ps1 rename to src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 index 1228585d62..355bef59a2 100644 --- a/src/chocolatey.resources/helpers/functions/Get-FileName.ps1 +++ b/src/chocolatey.resources/helpers/functions/Get-WebFileName.ps1 @@ -13,14 +13,14 @@ # limitations under the License. # # Based on http://stackoverflow.com/a/13571471/18475 -function Get-FileName { +function Get-WebFileName { param( [string]$url = '', [string]$defaultName, $userAgent = 'chocolatey command line' ) - Write-Debug "Running 'Get-FileName' to determine name with url:'$url', defaultName:'$defaultName'"; + Write-Debug "Running 'Get-WebFileName' to determine name with url:'$url', defaultName:'$defaultName'"; $originalFileName = $defaultName $fileName = $null