chokidar icon indicating copy to clipboard operation
chokidar copied to clipboard

Fix no events for symlinks with invalid targets

Open nathanael-ruf opened this issue 2 years ago • 0 comments

Even with followSymlinks: false no events (e.g. 'add') were emitted for links with a target that doesn't exist. Not sure about the changes / why we even need the realpath if followSymlinks: false. Also tests seem to fail (at least locally). This is more like a draft PR so far (maybe someone can take over or suggest changes).

Steps to repro:

const chokidar = require('.');
chokidar.watch('tmp', {
    usePolling: true,
    followSymlinks: false
}).on('all', (e, p) => console.log(e, p));
ln -s does-not-exist link

nathanael-ruf avatar Nov 21 '22 20:11 nathanael-ruf