Skip to content

Commit

Permalink
inotify: fix event filter to handle file writing and file renames (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
liske authored Oct 21, 2024
1 parent 0774346 commit ec6a440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async fn main() -> anyhow::Result<()> {
let meta = args.meta.clone();
tokio::spawn(async move {
let inotify = Inotify::init()?;
inotify.watches().add(meta, WatchMask::MODIFY)?;
inotify.watches().add(meta, WatchMask::CLOSE_WRITE | WatchMask::MOVED_TO)?;
let mut buf = [0; 1024];
let mut stream = inotify.into_event_stream(&mut buf)?;

Expand Down

0 comments on commit ec6a440

Please sign in to comment.