Skip to content

Commit d577cd3

Browse files
committed
apd: fix when change to overlay not effect
1 parent 5862754 commit d577cd3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apd/src/event.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::magic_mount;
22
use crate::module;
33
use crate::supercall::fork_for_result;
4-
use crate::utils::{ensure_dir_exists, get_work_dir, switch_cgroups};
4+
use crate::utils::{ensure_dir_exists, get_work_dir, switch_cgroups, ensure_file_exists};
55
use crate::{
66
assets, defs, mount, restorecon, supercall,
77
supercall::{init_load_package_uid_config, init_load_su_path, refresh_ap_package_list},
@@ -90,6 +90,11 @@ pub fn mount_systemlessly(module_dir: &str, is_img: bool) -> Result<()> {
9090
info!("- Preparing image");
9191

9292
let module_update_flag = Path::new(defs::WORKING_DIR).join(defs::UPDATE_FILE_NAME);
93+
94+
if !tmp_module_path.exists(){
95+
ensure_file_exists(&module_update_flag)?;
96+
}
97+
9398
if module_update_flag.exists() {
9499
if tmp_module_path.exists() {
95100
//if it has update, remove tmp file

0 commit comments

Comments
 (0)