Remove Platform.HasDriveAutoMounting query

This commit is contained in:
Andrew Schwartzmeyer
2016-07-14 17:34:12 -07:00
parent c9a4197af1
commit c2cd059aa8
3 changed files with 3 additions and 15 deletions
@@ -217,13 +217,6 @@ namespace System.Management.Automation
}
// This is mainly with respect to the auto-mounting of
// disconnected network drives on Windows
internal static bool HasDriveAutoMounting()
{
return IsWindows;
}
// Linux does not have a registry
internal static bool HasRegistrySupport()
{
@@ -1469,11 +1469,12 @@ namespace System.Management.Automation
bool driveIsValid = true;
// If the drive is auto-mounted, ensure that it still exists, or remove the drive.
// note: not all platforms support drive auto-mounting
if (Platform.HasDriveAutoMounting() && (drive.IsAutoMounted || IsAStaleVhdMountedDrive(drive)))
#if !LINUX
if (drive.IsAutoMounted || IsAStaleVhdMountedDrive(drive))
{
driveIsValid = ValidateOrRemoveAutoMountedDrive(drive, lookupScope);
}
#endif
if(drive.Name.Length == 1)
{
if(!(driveNames.Contains(drive.Name)))
-6
View File
@@ -15,12 +15,6 @@ namespace PSTests
Assert.True(Platform.IsCore);
}
[Fact]
public static void TestHasDriveAutoMounting()
{
Assert.False(Platform.HasDriveAutoMounting());
}
[Fact]
public static void TestHasRegistrySupport()
{