diff --git a/.gitignore b/.gitignore index 6eb8b6a7..38074aac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .idea .gradle build/ +boot.img* +local.properties \ No newline at end of file diff --git a/bbootimg/src/main/kotlin/bootimg/cpio/AndroidCpio.kt b/bbootimg/src/main/kotlin/bootimg/cpio/AndroidCpio.kt index dea1b312..a272818f 100644 --- a/bbootimg/src/main/kotlin/bootimg/cpio/AndroidCpio.kt +++ b/bbootimg/src/main/kotlin/bootimg/cpio/AndroidCpio.kt @@ -239,7 +239,7 @@ class AndroidCpio { } entry.isRegularFile -> { entryInfo.note = ("REG " + entryInfo.note) - File(outEntryName).writeBytes(buffer) + File(outEntryName).also { it.parentFile.mkdirs() }.writeBytes(buffer) if (EnvironmentVerifier().isWindows) { //Windows: Posix not supported } else {