Alloc dir uses MkdirAll

This commit is contained in:
Alex Dadgar
2016-03-28 14:33:53 -07:00
parent 0b1ecce6ed
commit 8742390da5
3 changed files with 8 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ func (d *AllocDir) MountSpecialDirs(taskDir string) error {
// Mount dev
dev := filepath.Join(taskDir, "dev")
if !d.pathExists(dev) {
if err := os.Mkdir(dev, 0777); err != nil {
if err := os.MkdirAll(dev, 0777); err != nil {
return fmt.Errorf("Mkdir(%v) failed: %v", dev, err)
}
@@ -41,7 +41,7 @@ func (d *AllocDir) MountSpecialDirs(taskDir string) error {
// Mount proc
proc := filepath.Join(taskDir, "proc")
if !d.pathExists(proc) {
if err := os.Mkdir(proc, 0777); err != nil {
if err := os.MkdirAll(proc, 0777); err != nil {
return fmt.Errorf("Mkdir(%v) failed: %v", proc, err)
}