From 58fe228dc0c4d418a9e2fddfdfa2a33d6e613856 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 14 Jul 2016 14:38:19 -0700 Subject: [PATCH] Remove Platform.HasFileShares query --- .../CoreCLR/CorePsPlatform.cs | 8 -------- .../engine/CommandCompletion/CompletionCompleters.cs | 10 ++++------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index c4edc350c0..4a9bda08ca 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -217,14 +217,6 @@ namespace System.Management.Automation } - // Linux has no notion of file shares. It has mount points - // instead, which are subdirectories of its single-root - // filesystem. - internal static bool HasFileShares() - { - return IsWindows(); - } - // Linux has no support for UNC, just mounts in a single rooted hierarchy // the UNC equivalent of a "network drive" aka mount would be the mount itself internal static bool HasUNCSupport() diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs index 8c3eb882bf..d3fba6c141 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs @@ -4464,12 +4464,9 @@ namespace System.Management.Automation internal static List GetFileShares(string machine, bool ignoreHidden) { - // Platform notes: don't throw an exception since this is being used in auto-completion - if (!Platform.HasFileShares()) - { - return new List(); - } - +#if LINUX + return new List(); +#else IntPtr shBuf; uint numEntries; uint totalEntries; @@ -4495,6 +4492,7 @@ namespace System.Management.Automation } } return shares; +#endif } private static bool CheckFileExtension(string path, HashSet extension)