joyent/node — Issue #2287: "Segmentation Fault" when a folder inside a watched folder is copied & pasted
Author: egeozcan
Created: 2011-12-07 20:03:05+00:00
State: open

The code:

var fs = require("fs")
fs.watch(__dirname + "/test", function() {
console.log(arguments);
})

To reproduce, first create a folder under "test", say "untitled folder" and run the given example code with node. After the script is running, copy that folder you just created and paste it in the same location, creating "untitled folder (copy)". Node exits with the following output:

{ '0': 'rename', '1': 'untitled folder (copy)' }
Segmentation fault

OS: Ubuntu 10.04 64Bit
Node: 0.6.4

I couldn't reproduce the problem under Windows 7 64Bit with the same version of node. I always used the GUI of the OS for the file operations when testing, if it makes a difference.