-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
rename raw event breaks further events #591
Comments
Please provide a script or repo for demonstrating the problem. I suspect the cause is something different than just receiving a |
I observe a similar behaviour on my CI tests at Linux if an empty dir is deleted: console.log src/index.js:242
RAW: rename -> empty
{ watchedPath: 'tmp/mock/bar/empty' }
console.log src/index.js:242
RAW: rename -> empty
{ watchedPath: 'tmp/mock/bar/empty' }
console.log src/index.js:242
RAW: rename -> empty
{ watchedPath: 'tmp/mock/bar' }
FAIL test/sync.spec.js (13.696s)
● node-sync-glob watch › should sync empty sub directory deletion
Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
node-sync-glob watch
✓ should sync a file (2135ms)
✓ should sync an array of files (2125ms)
✓ should sync a directory (2153ms)
✓ should sync globstar (2149ms)
✕ should sync empty sub directory deletion (5008ms) |
I also have this problem when editing a file which is watched. For example if you watch just
Where as
Listening the whole directory shows that gedit creates a temporary backup file and then just move the backup file:
|
Cool, 2 years, no fix. Splendid! |
@pkit Go ahead and fix it. No one pays me to do this. |
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
@paulmillr it would have more contributors if the tests were not failing left and right on unrelated things. |
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
will re-add the watcher on inode change in `fs.watch` mode on Linux the idea was shamelessly stolen from @paco3346 bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
will re-add the watcher on inode change in `fs.watch` mode on Linux bonus: fixed strange, pretty infrequent race in `fs.watchFile` test case `should emit matching dir events`
add `safe-edit` handling for Linux, fixes #591
Removes an obsolete workaround fix for paulmillr/chokidar#591. This seems to fix external editing with Vim.
.watch seems to break when there's a 'rename' event on Linux and no more events are fired from there on.
Vim fires this on wq and Git on checkout, for example.
The current workaround I'm using seems to fix this:
It seems this might be easily patched out by verifying that the renamed file has the same name and re-attach the listener automatically.
The text was updated successfully, but these errors were encountered: