Github user DeepSparkBot commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11570#discussion_r58247308
  
    --- Diff: project/SparkBuild.scala ---
    @@ -743,8 +744,18 @@ object TestSettings {
         parallelExecution in Test := false,
         // Make sure the test temp directory exists.
         resourceGenerators in Test <+= resourceManaged in Test map { outDir: 
File =>
    -      if (!new File(testTempDir).isDirectory()) {
    -        require(new File(testTempDir).mkdirs())
    +      var dir = new File(testTempDir)
    +      if (!dir.isDirectory()) {
    +        val stack = new Stack[File]()
    +        while (!dir.isDirectory()) {
    +          stack.push(dir)
    +          dir = dir.getParentFile()
    +        }
    +
    +        while (stack.nonEmpty) {
    +          val d = stack.pop()
    +          require(d.mkdir() || d.isDirectory(), s"Failed to create 
directory $d")
    +        }
    --- End diff --
    
    Please add a short comment to explain this logic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to