Skip to content

Commit

Permalink
(maint) rename Get-FileName to Get-WebFileName
Browse files Browse the repository at this point in the history
This is more reflective of what the function does.
  • Loading branch information
ferventcoder committed Apr 25, 2016
1 parent fbecc06 commit 4b0558e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/chocolatey.resources/chocolatey.resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<EmbeddedResource Include="helpers\chocolateyScriptRunner.ps1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="helpers\functions\Get-FileName.ps1" />
<EmbeddedResource Include="helpers\functions\Get-WebFileName.ps1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="helpers\functions\Get-ToolsLocation.ps1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b0558e

Please sign in to comment.