Do not reject Windows' reserved device names on non-Windows platforms. (#3252)

This commit is contained in:
jeffbi
2017-03-07 10:29:20 -08:00
committed by Dongbo Wang
parent e734d44199
commit 97be759cc7
2 changed files with 54 additions and 2 deletions
@@ -1110,6 +1110,7 @@ namespace System.Management.Automation
internal static bool IsReservedDeviceName(string destinationPath)
{
#if !UNIX
string[] reservedDeviceNames = { "CON", "PRN", "AUX", "CLOCK$", "NUL",
"COM0", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
"LPT0", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" };
@@ -1133,7 +1134,7 @@ namespace System.Management.Automation
return true;
}
}
#endif
return false;
}