Subject: | Possible Issue in deleting watched files |
Date: | Thu, 16 Jun 2016 16:00:22 -0700 |
To: | bug-AnyEvent-Filesys-Notify [...] rt.cpan.org |
From: | Dave Hayes <dave [...] jetcafe.org> |
Consider this small test script:
use EV;
use AnyEvent;
use AnyEvent::Filesys::Notify;
use AnyEvent::Filesys::Notify::Role::KQueue;
mkdir("/tmp/foobar");
my $q_watcher = AnyEvent::Filesys::Notify->new(
backend => 'KQueue',
dirs => [ "/tmp/foobar"],
cb => sub {
foreach my $e (@_) {
my $path = $e->path;
my $type = $e->type;
return unless ($type eq 'created' && -f $path);
unlink($path);
}
},
);
EV::run;
die "Shouldn't ever get here\n";
If I touch a file in /tmp/foobar (say "bletch") I get this error:
EV: error in callback (ignoring): Can't open file (/tmp/foobar/bletch):
No such file or directory at (eval 104) line 1.
Is this an error in my understanding or in this module? :)
Thanks in advance.
--
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
Show quoted text
>>>> *The opinions expressed above are entirely my own* <<<<
No one can make you feel inferior without your consent.