mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove Platform.HasFileShares query
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -4464,12 +4464,9 @@ namespace System.Management.Automation
|
||||
|
||||
internal static List<string> 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<string>();
|
||||
}
|
||||
|
||||
#if LINUX
|
||||
return new List<string>();
|
||||
#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<string> extension)
|
||||
|
||||
Reference in New Issue
Block a user