Skip to content
Open
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions src/torrent/utils/directory_events.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ directory_events::event_read() {
wd_list::const_iterator itr = std::find_if(m_wd_list.begin(), m_wd_list.end(),
std::bind(&watch_descriptor::compare_desc, std::placeholders::_1, event->wd));

if (itr != m_wd_list.end())
itr->slot(itr->path + event->name);
if (itr != m_wd_list.end()) {
std::string sname(event->name);
if((sname.substr(sname.find_last_of(".") ) == ".torrent"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks very similar to already present code...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beats me, It's been over 5 years since this commit...

itr->slot(itr->path + event->name);
}

event = (struct inotify_event*)(next_event);
}
Expand Down