From 9c19ef0f871007470898eb640bd5d9efabd85a84 Mon Sep 17 00:00:00 2001 From: magikstm Date: Wed, 4 Jan 2017 05:52:20 -0500 Subject: [PATCH] target: Add COM0 and LPT0 as reservedNames on Windows Fixes #2883 --- target/htmlredirect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/htmlredirect.go b/target/htmlredirect.go index 81a15fa73..7444dd42b 100644 --- a/target/htmlredirect.go +++ b/target/htmlredirect.go @@ -70,7 +70,7 @@ func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error // See "Naming Files, Paths, and Namespaces" on MSDN // https://msdn.microsoft.com/en-us/library/aa365247%28v=VS.85%29.aspx?f=255&MSPPError=-2147217396 msgs := []string{} - reservedNames := []string{"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"} + reservedNames := []string{"CON", "PRN", "AUX", "NUL", "COM0", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT0", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"} if strings.ContainsAny(alias, ":*?\"<>|") { msgs = append(msgs, fmt.Sprintf("Alias \"%s\" contains invalid characters on Windows: : * ? \" < > |", originalAlias))