Closed
Description
- Version: v10.15.3
- Platform: 4.15.0-46-generic debugger: use requireRepl() to load debugger repl #49~16.04.1-Ubuntu x86_64
- Subsystem: fs
Unless the fs.constants.COPYFILE_EXCL
flag is passed, when source
and destination
are the same, Node hangs forever.
const fs = require('fs');
fs.writeFileSync('foo', 'Hello World!');
fs.copyFileSync('foo', 'foo');
//Never reach here
console.log('Done');