mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 10:08:57 +00:00
Use GetRandomFileName instead of GetTempFileName. Fixes #1060
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.NodeServices
|
||||
/// <param name="applicationStoppingToken">A token that indicates when the host application is stopping.</param>
|
||||
public StringAsTempFile(string content, CancellationToken applicationStoppingToken)
|
||||
{
|
||||
FileName = Path.GetTempFileName();
|
||||
FileName = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
|
||||
File.WriteAllText(FileName, content);
|
||||
|
||||
// Because .NET finalizers don't reliably run when the process is terminating, also
|
||||
|
||||
Reference in New Issue
Block a user