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

Fix crash when watching renamed files on FreeBSD #12193

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

thecrypticace
Copy link
Contributor

Looks like, according to node docs, the filePath passed to the callback provided to fs.watch() can be null which we should account for.

I'm not certain the exact scenario in which this happens but we can at least guard against it so the watcher doesn't crash.

Fixes #12189

@thecrypticace thecrypticace changed the title Fix file watching bug when renaming files on FreeBSD Fix crash when watching renamed files on FreeBSD Oct 13, 2023
@thecrypticace thecrypticace merged commit 0b0862b into master Oct 17, 2023
10 checks passed
@thecrypticace thecrypticace deleted the fix/freebsd-file-renaming branch October 17, 2023 13:50
thecrypticace added a commit that referenced this pull request Oct 23, 2023
* Fix file watching bug when renaming files on FreeBSD

* Update changelog

* Add delay to test

* Bump delay

* Update test
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.

CLI tool throws an error when a watched file is changed by GIT
1 participant