From dbe16ca5d72a59431bfa0dd7043ed08abc0dbe0e Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 14 Jul 2016 15:44:47 -0700 Subject: [PATCH] Remove Platform.SupportsReparsePoints query --- .../CoreCLR/CorePsPlatform.cs | 6 ------ .../namespaces/FileSystemProvider.cs | 13 +++++-------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index 7f72c54fb8..5f780cef1f 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -217,12 +217,6 @@ namespace System.Management.Automation } - // non-windows does not have reparse points - internal static bool SupportsReparsePoints() - { - return IsWindows; - } - // non-windows does not support removing drives internal static bool SupportsRemoveDrive() { diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs index c9d7236b2c..4b4c024c70 100644 --- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs +++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs @@ -8589,14 +8589,11 @@ namespace Microsoft.PowerShell.Commands private static SafeFileHandle OpenReparsePoint(string reparsePoint, FileDesiredAccess accessMode) { - if (Platform.SupportsReparsePoints()) - { - return WinOpenReparsePoint(reparsePoint,accessMode); - } - else - { - throw new PlatformNotSupportedException(); - } +#if LINUX + throw new PlatformNotSupportedException(); +#else + return WinOpenReparsePoint(reparsePoint,accessMode); +#endif } private static SafeFileHandle WinOpenReparsePoint(string reparsePoint, FileDesiredAccess accessMode)