On Sat, 14 May 2016 04:22:46 +, Eric Wong wrote:
> I tried to have this watch some Maildirs but it fails to
> detect rename() calls. So this probably should watch for
> IN_MOVED_TO and IN_MOVED_FROM events from inotify.
>
> I also tried 0.12-1 from jessie with the same effect.
Thanks for your bug report.
I haven't tried myself now, but looking at the code this should work.
Filesys::Notify::Simple uses Linux::Inotify2, and does:
my $inotify = Linux::Inotify2->new;
my $fs = _full_scan(@path);
for my $path (keys %$fs) {
$inotify->watch($path,
_MODIFY|_CREATE|_DELETE|_DELETE_SELF|_MOVE_SELF|_MOVE);
}
and, according to the Linux::Inotify2 documentation:
IN_MOVE same as IN_MOVED_FROM | IN_MOVED_TO
So this needs further investigation ...
Cheers,
gregor
--
.''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Pink Floyd: On the Turning Away
signature.asc
Description: Digital Signature