File tree 1 file changed +0
-37
lines changed
src/PowerShellEditorServices/Workspace
1 file changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -578,43 +578,6 @@ public BufferRange GetRangeBetweenOffsets(int startOffset, int endOffset)
578
578
579
579
#region Private Methods
580
580
581
- private static string GetPathAsClientPath ( string path )
582
- {
583
- const string fileUriPrefix = "file:///" ;
584
-
585
- if ( path . StartsWith ( "untitled:" , StringComparison . Ordinal ) )
586
- {
587
- return path ;
588
- }
589
-
590
- if ( path . StartsWith ( "file:///" , StringComparison . Ordinal ) )
591
- {
592
- return path ;
593
- }
594
-
595
- if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
596
- {
597
- return new Uri ( path ) . AbsoluteUri ;
598
- }
599
-
600
- // VSCode file URIs on Windows need the drive letter lowercase, and the colon
601
- // URI encoded. System.Uri won't do that, so we manually create the URI.
602
- var newUri = System . Web . HttpUtility . UrlPathEncode ( path ) ;
603
- int colonIndex = path . IndexOf ( ":" ) ;
604
- for ( var i = colonIndex - 1 ; i >= 0 ; i -- )
605
- {
606
- newUri . Remove ( i , 1 ) ;
607
- newUri . Insert ( i , char . ToLowerInvariant ( path [ i ] ) . ToString ( ) ) ;
608
- }
609
-
610
- return newUri
611
- . Remove ( colonIndex , 1 )
612
- . Insert ( colonIndex , "%3A" )
613
- . Replace ( "\\ " , "/" )
614
- . Insert ( 0 , fileUriPrefix )
615
- . ToString ( ) ;
616
- }
617
-
618
581
private void SetFileContents ( string fileContents )
619
582
{
620
583
// Split the file contents into lines and trim
You can’t perform that action at this time.
0 commit comments