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

macOS: renaming a file to same name but different case emits wrong events #146

Open
bpasero opened this issue Sep 22, 2021 · 0 comments
Open

Comments

@bpasero
Copy link

bpasero commented Sep 22, 2021

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.

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

No branches or pull requests

1 participant