mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
(trunk daemon) #2899: "watch.c reports matches for every file" -- fixed in trunk for 1.90
This commit is contained in:
parent
a694ac185c
commit
6958386ecd
1 changed files with 5 additions and 2 deletions
|
@ -99,8 +99,11 @@ watchdir_update_impl( dtr_watchdir * w )
|
|||
int len = read( fd, buf, sizeof( buf ) );
|
||||
while (i < len) {
|
||||
struct inotify_event * event = (struct inotify_event *) &buf[i];
|
||||
tr_inf( "Found new .torrent file \"%s\" in watchdir \"%s\"", event->name, w->dir );
|
||||
w->callback( w->session, w->dir, event->name );
|
||||
if( strstr( event->name, ".torrent" ) != NULL )
|
||||
{
|
||||
tr_inf( "Found new .torrent file \"%s\" in watchdir \"%s\"", event->name, w->dir );
|
||||
w->callback( w->session, w->dir, event->name );
|
||||
}
|
||||
i += EVENT_SIZE + event->len;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue