浏览代码

Merge pull request #2610 from stapelberg/patch-1

Return “err” instead of “nil” when MkdirAll() fails when binding a volume
Victor Vieux 11 年之前
父节点
当前提交
f9dd0da182
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      container.go

+ 1 - 1
container.go

@@ -837,7 +837,7 @@ func (container *Container) Start() (err error) {
 		// Create the mountpoint
 		// Create the mountpoint
 		rootVolPath := path.Join(container.RootfsPath(), volPath)
 		rootVolPath := path.Join(container.RootfsPath(), volPath)
 		if err := os.MkdirAll(rootVolPath, 0755); err != nil {
 		if err := os.MkdirAll(rootVolPath, 0755); err != nil {
-			return nil
+			return err
 		}
 		}
 
 
 		// Do not copy or change permissions if we are mounting from the host
 		// Do not copy or change permissions if we are mounting from the host