From 1926af0eab43ac26ee9fca8e5683d5fac90c6389 Mon Sep 17 00:00:00 2001 From: cfig Date: Wed, 21 Sep 2022 10:43:16 +0800 Subject: [PATCH] fix packing failure of vendor_boot on Windows --- bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt b/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt index da4412f..a3c3837 100644 --- a/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt +++ b/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt @@ -477,7 +477,11 @@ data class VendorBoot( addArgument("--board_id$boardIdIndex") addArgument("0x" + Integer.toHexString((boardIdValue as Int))) } - addArgument("--ramdisk_name").addArgument(it.name, true) + if (EnvironmentVerifier().isWindows) { + addArgument("--ramdisk_name").addArgument("\"${it.name}\"", false) + } else { + addArgument("--ramdisk_name").addArgument(it.name, true) + } addArgument("--vendor_ramdisk_fragment").addArgument(it.file) } if (bootconfig.file.isNotBlank()) {