feat: Adding a KPM monitor to handle KPM file creation and deletion events
This commit is contained in:
@@ -9,6 +9,8 @@ use std::path::Path;
|
||||
pub fn on_post_data_fs() -> Result<()> {
|
||||
ksucalls::report_post_fs_data();
|
||||
|
||||
kpm::start_kpm_watcher()?;
|
||||
|
||||
utils::umask(0);
|
||||
|
||||
#[cfg(unix)]
|
||||
@@ -98,6 +100,13 @@ pub fn on_post_data_fs() -> Result<()> {
|
||||
|
||||
run_stage("post-mount", true);
|
||||
|
||||
for entry in std::fs::read_dir(kpm::KPM_DIR)? {
|
||||
let path = entry?.path();
|
||||
if path.extension().map_or(false, |ext| ext == "kpm") {
|
||||
let _ = kpm::load_kpm(&path);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user