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

    https://github.com/apache/spark/pull/4880#discussion_r25743304
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -643,7 +645,12 @@ private[spark] object Utils extends Logging {
               fileOverwrite)
           } else {
             val in = fs.open(innerPath)
    -        val targetFile = new File(targetDir, innerPath.getName)
    +        val targetFile: File =
    +          if (!filename.isEmpty) {
    +            new File(targetDir, filename)
    +          } else {
    +            new File(targetDir, innerPath.getName)
    +          }
    --- End diff --
    
    Yes, the problem here is that now `targetDir` is the parent directory of 
where `path` should be, and the children are being written directly to that 
parent path. It needs some code to create this directory corresponding to 
`path` before downloading the children.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to