Create the file path on the tool service (#874)

* Create the file path on the tool service

* Add comment

* Modify comment

* Use Path.GetTempFileName()
This commit is contained in:
Amir Omidi
2019-10-07 13:10:19 -07:00
committed by GitHub
parent f392a4a3f3
commit 1c74e1af6f

View File

@@ -4,6 +4,7 @@
//
using System;
using System.IO;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Threading.Tasks;
@@ -126,6 +127,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Scripting
}
}
if (parameters.FilePath == null)
{
// Create a temporary and random path to handle this operation
parameters.FilePath = Path.GetTempFileName();
}
if (!ShouldCreateScriptAsOperation(parameters))
{
operation = new ScriptingScriptOperation(parameters, accessToken);