Skip to content

Commit

Permalink
Work around URI parsing issue for Windows drives
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIrv committed Nov 20, 2017
1 parent 7a3baf6 commit c8ec978
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Microsoft.SqlTools.ServiceLayer/Workspace/Workspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ private ResolvedFile ResolveFilePath(string filePath)
{
if (filePath.StartsWith(@"file://"))
{
// VS Code encodes the ':' character in the drive name, which can lead to problems parsing
// the URI, so unencode it if present. See https://github.com/Microsoft/vscode/issues/2990
filePath = filePath.Replace("%3A/", ":/", StringComparison.OrdinalIgnoreCase);

// Client sent the path in URI format, extract the local path and trim
// any extraneous slashes
Uri fileUri = new Uri(filePath);
Expand Down

0 comments on commit c8ec978

Please sign in to comment.