12764: Handle empty directories. Fix test.
[arvados.git] / services / crunch-run / crunchrun.go
index dfb1eb85e08c54652335b71a6f88ec88aa9818ef..5c4f105f9c7037e5bdafba55df1ca6f2559b5199 100644 (file)
@@ -588,8 +588,7 @@ func (runner *ContainerRunner) SetupMounts() (err error) {
                                if walkinfo.Mode().IsRegular() {
                                        return copyfile(walkpath, path.Join(cp.bind, walkpath[len(cp.src):]))
                                } else if walkinfo.Mode().IsDir() {
-                                       // will be visited by Walk()
-                                       return nil
+                                       return os.MkdirAll(path.Join(cp.bind, walkpath[len(cp.src):]), 0770)
                                } else {
                                        return fmt.Errorf("Source %q is not a regular file or directory", cp.src)
                                }