github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/containerfs/containerfs_windows.go (about) 1 package containerfs // import "github.com/demonoid81/moby/pkg/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 }