mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Do not reject Windows' reserved device names on non-Windows platforms. (#3252)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user