Add inotify::WatchMask::MODIFY to inotify watch mask.

Closes #362
This commit is contained in:
Luke D. Jones
2023-06-20 22:23:54 +12:00
parent e2fb1d44b5
commit 3e0aeea6c6
2 changed files with 3 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ macro_rules! watch_attr {
path.push($attr_name);
if let Some(path) = path.to_str() {
let inotify = inotify::Inotify::init()?;
inotify.watches().add(path, inotify::WatchMask::CLOSE_WRITE)
inotify.watches().add(path, inotify::WatchMask::CLOSE_WRITE | inotify::WatchMask::MODIFY)
.map_err(|e| {
if e.kind() == std::io::ErrorKind::NotFound {
PlatformError::AttrNotFound(format!("{}", $attr_name))