File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/tools/illink/test/Mono.Linker.Tests/Extensions Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- // Copyright (c) .NET Foundation and contributors. All rights reserved.
1
+ // Copyright (c) .NET Foundation and contributors. All rights reserved.
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
4
// The MIT License(MIT)
31
31
using System . Collections . Generic ;
32
32
using System . IO ;
33
33
using System . Linq ;
34
+ using System . Runtime . InteropServices ;
34
35
using System . Text ;
35
36
36
37
namespace Mono . Linker . Tests . Extensions
37
38
{
38
39
public class NPath : IEquatable < NPath > , IComparable
39
40
{
40
- private static readonly StringComparison PathStringComparison = IsLinux ( ) ? StringComparison . Ordinal : StringComparison . OrdinalIgnoreCase ;
41
+ private static readonly StringComparison PathStringComparison = RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ?
42
+ StringComparison . OrdinalIgnoreCase : StringComparison . Ordinal ;
41
43
42
44
private readonly string [ ] _elements ;
43
45
private readonly bool _isRelative ;
@@ -804,11 +806,6 @@ static bool AlwaysTrue (NPath p)
804
806
{
805
807
return true ;
806
808
}
807
-
808
- private static bool IsLinux ( )
809
- {
810
- return Directory . Exists ( "/proc" ) ;
811
- }
812
809
}
813
810
814
811
public static class Extensions
You can’t perform that action at this time.
0 commit comments