Skip to content

Commit 506d875

Browse files
authored
Merge pull request containerd#3553 from apostasie/fix-overzealous-windows-path
Fix over-eager windows path restrictions
2 parents b2cc827 + 24cbe25 commit 506d875

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/store/filestore_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
// See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
2525
// https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names
2626
var (
27-
disallowedKeywords = regexp.MustCompile(`(?i)^(con|prn|nul|aux|com[1-9¹²³]|lpt[1-9¹²³])([.].*)?`)
27+
disallowedKeywords = regexp.MustCompile(`(?i)^(con|prn|nul|aux|com[1-9¹²³]|lpt[1-9¹²³])([.].*)?$`)
2828
reservedCharacters = regexp.MustCompile(`[\x{0}-\x{1f}<>:"/\\|?*]`)
2929
)
3030

0 commit comments

Comments
 (0)