github.com/a4a881d4/docker@v1.9.0-rc2/volume/local/local_windows.go (about) 1 // Package local provides the default implementation for volumes. It 2 // is used to mount data volume containers and directories local to 3 // the host server. 4 package local 5 6 import ( 7 "path/filepath" 8 "strings" 9 ) 10 11 // scopedPath verifies that the path where the volume is located 12 // is under Docker's root and the valid local paths. 13 func (r *Root) scopedPath(realPath string) bool { 14 if strings.HasPrefix(realPath, filepath.Join(r.scope, volumesPathName)) && realPath != filepath.Join(r.scope, volumesPathName) { 15 return true 16 } 17 return false 18 }