From 311bf1b6411f25afd030d1c5389f2a0ae5730711 Mon Sep 17 00:00:00 2001 From: David Sparer Date: Wed, 22 Mar 2017 16:48:38 -0600 Subject: [PATCH] fix issue with retrieving fuzzy file name --- Tools/publish_to_github.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/publish_to_github.ps1 b/Tools/publish_to_github.ps1 index 91e36190a..46be056d1 100644 --- a/Tools/publish_to_github.ps1 +++ b/Tools/publish_to_github.ps1 @@ -155,9 +155,9 @@ function Upload-ReleaseAsset { ) $UploadUri = $UploadUri -replace "(\{[\w,\?]*\})$" - $fileName = Split-Path -Path $FilePath -Leaf + $file = Get-Item -Path $FilePath - $req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$fileName" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $FilePath -ErrorAction Stop + $req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop }