fix: wrong separator when using ZipFileSystemUtils

This commit is contained in:
oSumAtrIX 2022-06-28 00:11:51 +02:00
parent 9f91f63220
commit 20e15defc2
2 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,7 @@ internal object Patcher {
logger.info("Writing resources...") logger.info("Writing resources...")
ZipFileSystemUtils(result.resourceFile!!).use { resourceFileSystem -> ZipFileSystemUtils(result.resourceFile!!).use { resourceFileSystem ->
val resourceFiles = resourceFileSystem.getFile(File.pathSeparator) val resourceFiles = resourceFileSystem.getFile(File.separator)
outputFileSystem.writePathRecursively(resourceFiles) outputFileSystem.writePathRecursively(resourceFiles)
} }
} }

View File

@ -56,6 +56,7 @@ internal class ZipFileSystemUtils(
private fun Path.getRelativePath(path: Path): Path = zipFileSystem.getPath(path.relativize(this).toString()) 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) = internal fun uncompress(vararg paths: String) =
paths.forEach { Files.setAttribute(zipFileSystem.getPath(it), "zip:method", ZipEntry.STORED) } paths.forEach { Files.setAttribute(zipFileSystem.getPath(it), "zip:method", ZipEntry.STORED) }