mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -4,6 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
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))
|
if (!ShouldCreateScriptAsOperation(parameters))
|
||||||
{
|
{
|
||||||
operation = new ScriptingScriptOperation(parameters, accessToken);
|
operation = new ScriptingScriptOperation(parameters, accessToken);
|
||||||
|
|||||||
Reference in New Issue
Block a user