From f6d552c797370e70da3e831ea97f53d5b8ed332a Mon Sep 17 00:00:00 2001 From: weishu Date: Sun, 17 Mar 2024 17:25:42 +0800 Subject: [PATCH] ksud: ensure post-fs-data.d is created by post ota --- userspace/ksud/src/boot_patch.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/userspace/ksud/src/boot_patch.rs b/userspace/ksud/src/boot_patch.rs index 302e442fb94d..9ec90334d024 100644 --- a/userspace/ksud/src/boot_patch.rs +++ b/userspace/ksud/src/boot_patch.rs @@ -331,9 +331,9 @@ fn post_ota() -> Result<()> { .arg(format!("set-active-boot-slot {target_slot}")) .status()?; - let post_ota_sh = std::path::Path::new(ADB_DIR) - .join("post-fs-data.d") - .join("post_ota.sh"); + let post_fs_data = std::path::Path::new(ADB_DIR).join("post-fs-data.d"); + utils::ensure_dir_exists(&post_fs_data)?; + let post_ota_sh = post_fs_data.join("post_ota.sh"); let sh_content = format!( r###"