Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions include/dir_monitor/inotify/dir_monitor_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class dir_monitor_impl

void add_directory(const std::string &dirname)
{
int wd = inotify_add_watch(fd_, dirname.c_str(), IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO);
int wd = inotify_add_watch(fd_, dirname.c_str(), IN_CREATE | IN_DELETE | IN_ATTRIB | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO);
if (wd == -1)
{
boost::system::system_error e(boost::system::error_code(errno, boost::system::get_system_category()), "boost::asio::dir_monitor_impl::add_directory: inotify_add_watch failed");
Expand Down Expand Up @@ -159,7 +159,9 @@ class dir_monitor_impl
{
case IN_CREATE: type = dir_monitor_event::added; break;
case IN_DELETE: type = dir_monitor_event::removed; break;
case IN_MODIFY: type = dir_monitor_event::modified; break;
case IN_ATTRIB:
case IN_MODIFY: type = dir_monitor_event::modified;
break;
case IN_MOVED_FROM: type = dir_monitor_event::renamed_old_name; break;
case IN_MOVED_TO: type = dir_monitor_event::renamed_new_name; break;
case IN_CREATE | IN_ISDIR:
Expand Down