Return “err” instead of “nil” when MkdirAll() fails when binding a volume

Upstream-commit: e7fdcc15c5eb3812c71dd61f22a8d77d3ae72e36
Component: engine
This commit is contained in:
Michael Stapelberg
2013-11-08 22:52:10 +01:00
parent 08ddb7c17c
commit e5498d2e58

View File

@ -837,7 +837,7 @@ func (container *Container) Start() (err error) {
// Create the mountpoint
rootVolPath := path.Join(container.RootfsPath(), volPath)
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