chokidar
chokidar copied to clipboard
Folder rename is not reported when using a pattern
Describe the bug
When a folder is renamed and the original and new folder is part of a path that is covered by a glob that chokidar is watching, no events are fired.
Versions:
- Chokidar version: 3.5.3
- Node version: 18.16.0
- OS version: MacOs 13.5
To Reproduce:
- create a file
./hello/foo/file.txt
- run
const path = require('path'); const chokidar = require('chokidar'); chokidar.watch(path.resolve(__dirname, './hello/*/file.txt')).on('all', (event, filePath) => { console.log(event, filePath); });
- run
mv ./hello/foo ./hello/bar
- no events are being fired
Expected behavior
an unlink
and add
event is fired for the rename. (This does happen when using usePolling
)