Merge pull request #5068 from tianon/fix-abs-volume-check

Fix edge case in bind mount absolute path detection
This commit is contained in:
unclejack 2014-04-08 20:03:52 +03:00
commit 1bcb9ce69e
1 changed files with 2 additions and 6 deletions

View File

@ -177,12 +177,8 @@ func createVolumes(container *Container) error {
if bindMap, exists := binds[volPath]; exists {
isBindMount = true
srcPath = bindMap.SrcPath
srcAbs, err := filepath.Abs(srcPath)
if err != nil {
return err
}
if srcPath != srcAbs {
return fmt.Errorf("%s should be an absolute path", srcPath)
if !filepath.IsAbs(srcPath) {
return fmt.Errorf("%s must be an absolute path", srcPath)
}
if strings.ToLower(bindMap.Mode) == "rw" {
srcRW = true