Skip to content

Commit 20e15de

Browse files
committed
fix: wrong separator when using ZipFileSystemUtils
1 parent 9f91f63 commit 20e15de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/main/kotlin/app/revanced/cli/patcher/Patcher.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal object Patcher {
3636
logger.info("Writing resources...")
3737

3838
ZipFileSystemUtils(result.resourceFile!!).use { resourceFileSystem ->
39-
val resourceFiles = resourceFileSystem.getFile(File.pathSeparator)
39+
val resourceFiles = resourceFileSystem.getFile(File.separator)
4040
outputFileSystem.writePathRecursively(resourceFiles)
4141
}
4242
}

src/main/kotlin/app/revanced/utils/filesystem/ZipFileSystemUtils.kt

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ internal class ZipFileSystemUtils(
5656

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

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

0 commit comments

Comments
 (0)