Skip to content

fs.watch has double change events for file writes #3042

@andy-hanson

Description

@andy-hanson

Run these commands:

echo "require('fs').watch(__dirname).on('change', console.log)" > watch.js
node watch.js &
echo "" > watch.js

To get this output:

change watch.js
change watch.js

I'm running node v4.1.1 on Linux Mint 17.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions