Remove Platform.HasDriveAutoMounting query

This commit is contained in:
Andrew Schwartzmeyer committed 2016-07-14 17:34:12 -07:00
1 parent c9a4197af1
commit c2cd059aa8
3 files changed
+3 -15

No files matched your search

@@ -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 // Linux does not have a registry
internal static bool HasRegistrySupport() internal static bool HasRegistrySupport()
{ {
@@ -1469,11 +1469,12 @@ namespace System.Management.Automation
bool driveIsValid = true; bool driveIsValid = true;
// If the drive is auto-mounted, ensure that it still exists, or remove the drive. // If the drive is auto-mounted, ensure that it still exists, or remove the drive.
// note: not all platforms support drive auto-mounting #if !LINUX
if (Platform.HasDriveAutoMounting() && (drive.IsAutoMounted || IsAStaleVhdMountedDrive(drive))) if (drive.IsAutoMounted || IsAStaleVhdMountedDrive(drive))
{ {
driveIsValid = ValidateOrRemoveAutoMountedDrive(drive, lookupScope); driveIsValid = ValidateOrRemoveAutoMountedDrive(drive, lookupScope);
} }
#endif
if(drive.Name.Length == 1) if(drive.Name.Length == 1)
{ {
if(!(driveNames.Contains(drive.Name))) if(!(driveNames.Contains(drive.Name)))
-6
View File
@@ -15,12 +15,6 @@ namespace PSTests
Assert.True(Platform.IsCore); Assert.True(Platform.IsCore);
} }
[Fact]
public static void TestHasDriveAutoMounting()
{
Assert.False(Platform.HasDriveAutoMounting());
}
[Fact] [Fact]
public static void TestHasRegistrySupport() public static void TestHasRegistrySupport()
{ {