Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When IO::Notification is watching a file, the path attribute doubles the filename #6502

Open
p6rt opened this issue Sep 6, 2017 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 6, 2017

Migrated from rt.perl.org#132043 (status was 'open')

Searchable as RT132043$

@p6rt
Copy link
Author

p6rt commented Sep 6, 2017

From @zoffixznet

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$

@p6rt
Copy link
Author

p6rt commented Jan 6, 2018

From @dogbert17

On Wed, 06 Sep 2017 16​:08​:08 -0700, cpan@​zoffix.com wrote​:

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.

@p6rt
Copy link
Author

p6rt commented Jan 6, 2018

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt added the IO label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant