Skip Menu |
Report information
Id: 132043
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [IO] When IO::Notification is watching a file, the `path` attribute doubles the filename
Download (untitled) / with headers
text/plain 844b
IRC: https://irclog.perlgeek.de/perl6/2017-09-06#i_15127587 Steps to repro. Create a file named "foo.p6" then run the following watcher in the directory and edit that file. The nofication reports a change in "foo.p6/foo.p6" instead of just "./foo.p6" zoffix@VirtualBox/tmp/tmp.ckoExUdCEj$ perl6 -e 'react { whenever "foo.p6".IO.watch { dd $^file } }' IO::Notification::Change $file = IO::Notification::Change.new(path => "/tmp/tmp.ckoExUdCEj/foo.p6/foo.p6", event => FileChangeEvent::FileChanged) IO::Notification::Change $file = IO::Notification::Change.new(path => "/tmp/tmp.ckoExUdCEj/foo.p6/foo.p6", event => FileChangeEvent::FileChanged) ^C zoffix@VirtualBox/tmp/tmp.ckoExUdCEj$
Download (untitled) / with headers
text/plain 973b
On Wed, 06 Sep 2017 16:08:08 -0700, cpan@zoffix.com wrote: Show quoted text
> IRC: https://irclog.perlgeek.de/perl6/2017-09-06#i_15127587 > > Steps to repro. Create a file named "foo.p6" then run the following > watcher in the directory and edit that file. > The nofication reports a change in "foo.p6/foo.p6" instead of just > "./foo.p6" > > zoffix@VirtualBox/tmp/tmp.ckoExUdCEj$ perl6 -e 'react { whenever > "foo.p6".IO.watch { dd $^file } }' > IO::Notification::Change $file = IO::Notification::Change.new(path => > "/tmp/tmp.ckoExUdCEj/foo.p6/foo.p6", event => > FileChangeEvent::FileChanged) > IO::Notification::Change $file = IO::Notification::Change.new(path => > "/tmp/tmp.ckoExUdCEj/foo.p6/foo.p6", event => > FileChangeEvent::FileChanged) > ^C > zoffix@VirtualBox/tmp/tmp.ckoExUdCEj$
Seems to have been fixed at some point. Tested the example code, with 'Rakudo version 2017.12-124-g6a6470f9d built on MoarVM version 2017.12-20-g571034087', and the filename only shows up once.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org