mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-25 09:35:37 -05:00
Fix/integrationtests (#391)
* fixed the problem with parsing sql2017 version
This commit is contained in:
@@ -828,17 +828,29 @@ GO";
|
||||
/// </summary>
|
||||
private void Cleanup(Location[] locations)
|
||||
{
|
||||
Uri fileUri = new Uri(locations[0].Uri);
|
||||
if (File.Exists(fileUri.LocalPath))
|
||||
try
|
||||
{
|
||||
try
|
||||
string filePath = locations[0].Uri;
|
||||
Uri fileUri = null;
|
||||
if (Uri.IsWellFormedUriString(filePath, UriKind.Absolute))
|
||||
{
|
||||
File.Delete(fileUri.LocalPath);
|
||||
fileUri = new Uri(filePath);
|
||||
}
|
||||
catch (Exception)
|
||||
else
|
||||
{
|
||||
|
||||
filePath = filePath.Replace("file:/", "file://");
|
||||
if (Uri.IsWellFormedUriString(filePath, UriKind.Absolute))
|
||||
{
|
||||
fileUri = new Uri(filePath);
|
||||
}
|
||||
}
|
||||
if (fileUri != null && File.Exists(fileUri.LocalPath))
|
||||
{
|
||||
File.Delete(fileUri.LocalPath);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user