Skip to content

Commit

Permalink
fix: wrong separator when using ZipFileSystemUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 27, 2022
1 parent 9f91f63 commit 20e15de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/app/revanced/cli/patcher/Patcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal object Patcher {
logger.info("Writing resources...")

ZipFileSystemUtils(result.resourceFile!!).use { resourceFileSystem ->
val resourceFiles = resourceFileSystem.getFile(File.pathSeparator)
val resourceFiles = resourceFileSystem.getFile(File.separator)
outputFileSystem.writePathRecursively(resourceFiles)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ internal class ZipFileSystemUtils(

private fun Path.getRelativePath(path: Path): Path = zipFileSystem.getPath(path.relativize(this).toString())

// TODO: figure out why the file system is uncompressed by default and how to fix it
internal fun uncompress(vararg paths: String) =
paths.forEach { Files.setAttribute(zipFileSystem.getPath(it), "zip:method", ZipEntry.STORED) }

Expand Down

0 comments on commit 20e15de

Please sign in to comment.