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

Improved handling of file & folder renaming/moving #402

Merged
merged 9 commits into from
Jan 9, 2022

Conversation

RvanderLaan
Copy link
Collaborator

Chokidar is kind of awkward when it comes to moving/renaming files and folders, it emits an add and remove event instead of a move or rename event as you'd expect.
I came across some workarounds in here: paulmillr/chokidar#303 (comment)

Apparently every file has an ino field which remains the same after renaming/moving. In this PR I use that to detect whether we already detected the file before when an add event is emitted, so we don't add it as a new file

@hummingly hummingly merged commit 57e3ca6 into master Jan 9, 2022
@hummingly hummingly deleted the file-move-detection-improvements branch May 1, 2022 13:29
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.

2 participants