From 22b4a9f7f87cd460fe7a14feb6b99edd184f96b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Przemys=C5=82aw=20Pluta?= Date: Tue, 9 Mar 2021 12:17:56 +0100 Subject: [PATCH] [Editor] Enable creating directory path when copying file to JAR archive --- .../base/editor/code/build/packager/ZipBasedJarPackager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/code/build/packager/ZipBasedJarPackager.kt b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/code/build/packager/ZipBasedJarPackager.kt index b991f768..07e2ecc9 100644 --- a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/code/build/packager/ZipBasedJarPackager.kt +++ b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/code/build/packager/ZipBasedJarPackager.kt @@ -35,6 +35,7 @@ class ZipBasedJarPackager : JarPackager { FileSystems.newFileSystem(uri, env).use { jar -> val path = jar.getPath(Paths.get(root, file.name).normalize().toString()) + Files.createDirectories(path.parent) file.inputStream().use { fis -> Files.copy(fis, path) } } }