Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ private static string GetFileUri(string filePath)
{
// If the file isn't untitled, return a URI-style path
return
!filePath.StartsWith("untitled")
!filePath.StartsWith("untitled") && !filePath.StartsWith("inmemory")
? new Uri("file://" + filePath).AbsoluteUri
: filePath;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ public static string GetFileUri(string filePath)
{
// If the file isn't untitled, return a URI-style path
return
!filePath.StartsWith("untitled")
!filePath.StartsWith("untitled") && !filePath.StartsWith("inmemory")
? new Uri("file://" + filePath).AbsoluteUri
: filePath;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void CanDetermineIsPathInMemory()
// Test short non-file paths
new { IsInMemory = true, Path = "untitled:untitled-1" },
new { IsInMemory = true, Path = shortUriForm },
new { IsInMemory = true, Path = "inmemory://foo.ps1" },

// Test long non-file path - known to have crashed PSES
new { IsInMemory = true, Path = longUriForm },
Expand Down