This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/Microsoft.AspNetCore.NodeServices/Util Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 77 - ps : $urlCurrent = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0-preview2-006497/dotnet-sdk-2.0.0-preview2-006497-win-x64.zip"
88 - ps : $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
99 - ps : mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
10- - ps : $tempFileCurrent = [System.IO.Path]::GetTempFileName( )
10+ - ps : $tempFileCurrent = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName() )
1111 - ps : (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent)
1212 - ps : Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR)
1313 - ps : $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public sealed class StringAsTempFile : IDisposable
2121 /// <param name="applicationStoppingToken">A token that indicates when the host application is stopping.</param>
2222 public StringAsTempFile ( string content , CancellationToken applicationStoppingToken )
2323 {
24- FileName = Path . GetTempFileName ( ) ;
24+ FileName = Path . Combine ( Path . GetTempPath ( ) , Path . GetRandomFileName ( ) ) ;
2525 File . WriteAllText ( FileName , content ) ;
2626
2727 // Because .NET finalizers don't reliably run when the process is terminating, also
You can’t perform that action at this time.
0 commit comments