github.com/ttys3/engine@v17.12.1-ce-rc2+incompatible/pkg/containerfs/containerfs_windows.go (about) 1 package containerfs 2 3 import "path/filepath" 4 5 // cleanScopedPath removes the C:\ syntax, and prepares to combine 6 // with a volume path 7 func cleanScopedPath(path string) string { 8 if len(path) >= 2 { 9 c := path[0] 10 if path[1] == ':' && ('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z') { 11 path = path[2:] 12 } 13 } 14 return filepath.Join(string(filepath.Separator), path) 15 }