Skip to content

Commit 0475ac5

Browse files
committed
Update comment for sure
1 parent 00d5322 commit 0475ac5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/src/main/scala/org/apache/spark/deploy/RPackageUtils.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)