+ my ($dh, $path, $old_ctime) = @{$watch->{$ident}};
+ if (!defined($old_ctime)) {
+ push @$events,
+ bless(\$path, 'PublicInbox::FakeInotify::Event')
+ } elsif ($mask & (MOVED_TO_OR_CREATE|NOTE_DELETE|NOTE_LINK|
+ NOTE_REVOKE|NOTE_RENAME)) {
+ my @new_st = stat($path);
+ if (!@new_st && $!{ENOENT}) {
+ push @$events, bless(\$path,
+ 'PublicInbox::FakeInotify::'.
+ 'SelfGoneEvent');
+ push @gone, $ident;
+ delete $self->{dirlist}->{$path};
+ next;
+ }
+ if (!@new_st) {
+ warn "unhandled stat($path) error: $!\n";
+ next;
+ }
+ $watch->{$ident}->[3] = $new_st[10]; # ctime
+ rewinddir($dh);
+ on_dir_change($events, $dh, $path, $old_ctime,
+ $self->{dirlist});