Skip to content

Conversation

@mgreter
Copy link

@mgreter mgreter commented Nov 15, 2017

There was no event emitted if the last entry from a
directory was removed. Basically the same fix as in
the linked issue (thx @cnmota). I hope this doesn't
degrade compare performance too much!

Fixes #8

@mgreter mgreter force-pushed the bugfix/empty-directory-watch branch 2 times, most recently from cddee23 to d758d10 Compare November 15, 2017 03:32
@mgreter
Copy link
Author

mgreter commented Nov 15, 2017

Added another test which needs #23 to work correctly on windows.
Not sure if all other platforms support recursive path watching though!?
Well, CI came back red, so I guess recursive path watching is not supported ...
Not sure if it should be disabled in the windows implementation then ...

@mgreter mgreter force-pushed the bugfix/empty-directory-watch branch from d758d10 to 8f5a9fc Compare November 15, 2017 03:45
There was no event emitted if the last entry from a
directory was removed. Keep track of all directories
in a specific location (`.`) inside the fs hash.
@mgreter mgreter force-pushed the bugfix/empty-directory-watch branch from 8f5a9fc to aedb877 Compare November 15, 2017 03:56
@mgreter
Copy link
Author

mgreter commented Nov 15, 2017

OK, was simply a timing issue, wasn't aware of the 2 seconds polling interval ...

@mgreter
Copy link
Author

mgreter commented Nov 15, 2017

Made the interval configurable from outside, hope you don't mind. Feel free to cherry pick the bits you like. I hope it was worth the effort. I will use https://github.com/mgreter/Filesys-Notify-Simple in the meantime for bundling my stuff on windows to get a working file watcher. Thanks!

And use it to speed up unit tests
@mgreter mgreter force-pushed the bugfix/empty-directory-watch branch from b3de195 to 9ca917b Compare November 17, 2017 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_file_scan on Linux::Inotify2 wont monitor empty dirs

1 participant