File tree 1 file changed +2
-5
lines changed
src/PowerShellEditorServices/Utility
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 4
4
//
5
5
6
6
using System . IO ;
7
+ using System . Runtime . InteropServices ;
7
8
8
9
namespace Microsoft . PowerShell . EditorServices . Utility
9
10
{
@@ -32,11 +33,7 @@ internal static class PathUtils
32
33
/// be "slash agnostic", we need to use the assumption that a '\' is the alternate path
33
34
/// separator on Linux.
34
35
/// </summary>
35
- #if CoreCLR
36
- internal static readonly char AlternatePathSeparator = System . Management . Automation . Platform . IsWindows ? '/' : '\\ ' ;
37
- #else
38
- internal static readonly char AlternatePathSeparator = '/' ;
39
- #endif
36
+ internal static readonly char AlternatePathSeparator = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? '/' : '\\ ' ;
40
37
internal static readonly string AlternatePathSeparatorString = AlternatePathSeparator . ToString ( ) ;
41
38
42
39
/// <summary>
You can’t perform that action at this time.
0 commit comments