github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/pkg/containerfs/containerfs_windows.go (about)

     1  package containerfs // import "github.com/docker/docker/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  }