File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -236,9 +236,11 @@ private[deploy] object RPackageUtils extends Logging {
236236 val zipOutputStream = new ZipOutputStream (new FileOutputStream (zipFile, false ))
237237 try {
238238 filesToBundle.foreach { file =>
239- // Get the relative paths for proper naming in the zip file. Note that
240- // the separator should always be / for according to ZIP specification.
241- // `relPath` here should be, for example, "/packageTest/def.R" or "/test.R".
239+ // Get the relative paths for proper naming in the ZIP file. Note that
240+ // we convert dir to URI to force / and then remove trailing / that show up for
241+ // directories because the separator should always be / for according to ZIP
242+ // specification and therefore `relPath` here should be, for example,
243+ // "/packageTest/def.R" or "/test.R".
242244 val relPath = file.toURI.toString.replaceFirst(dir.toURI.toString.stripSuffix(" /" ), " " )
243245 val fis = new FileInputStream (file)
244246 val zipEntry = new ZipEntry (relPath)
You can’t perform that action at this time.
0 commit comments