Skip to content

Commit 1167392

Browse files
committed
Not sending directory deletion events
1 parent 78a3c2e commit 1167392

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

fact/src/event/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,8 @@ impl From<FileData> for fact_api::file_activity::File {
384384
FileData::MkDir(_) => {
385385
unreachable!("MkDir event reached protobuf conversion");
386386
}
387-
FileData::RmDir(event) => {
388-
// For now, report directory deletion as unlink
389-
// TODO: Filter this out like MkDir once inode tracking is stable
390-
let activity = Some(fact_api::FileActivityBase::from(event));
391-
let f_act = fact_api::FileUnlink { activity };
392-
fact_api::file_activity::File::Unlink(f_act)
387+
FileData::RmDir(_) => {
388+
unreachable!("RmDir event reached protobuf conversion");
393389
}
394390
FileData::Unlink(event) => {
395391
let activity = Some(fact_api::FileActivityBase::from(event));

fact/src/host_scanner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ impl HostScanner {
295295
self.handle_unlink_event(&event);
296296
}
297297

298-
// Skip directory creation events - we track them internally but don't send to sensor
299-
if event.is_mkdir() {
298+
// Skip directory creation and deletion events - we track them internally but don't send to sensor
299+
if event.is_mkdir() || event.is_rmdir() {
300300
continue;
301301
}
302302

0 commit comments

Comments
 (0)