Have a watcher such as this one:
const nsfw = require("nsfw");
nsfw('<path to folder>', events => {
for (const event of events) {
console.log(event);
}
}, {
errorCallback: error => console.error(error)
}).then(watcher => {
return watcher.start();
}).then(() => {
console.log("DONE")
});
On macOS (I am on 11.6) select a file in the finder and rename the file by only changing the case of one letter of the file.
=> 🐛 the output is:
{
action: 2,
directory: '/Users/bpasero/Desktop/nsfw/fixtures',
file: 'index.js'
}
{
action: 2,
directory: '/Users/bpasero/Desktop/nsfw/fixtures',
file: 'Index.js'
}
Which indicates this is a change event, but I would have expected either rename or delete+add.
This works fine on Windows btw.