Browse Source

Fix so copySync unlinking read only file will now work on

nodejs 0.10.40. This commit fixes #183.
ci/travis-osximage
bartland 9 years ago
parent
commit
8753c3d0bf
  1. 1
      lib/copy-sync/copy-file-sync.js

1
lib/copy-sync/copy-file-sync.js

@ -9,6 +9,7 @@ function copyFileSync (srcFile, destFile, options) {
if (fs.existsSync(destFile)) {
if (clobber) {
fs.chmodSync(destFile, parseInt('777', 8))
fs.unlinkSync(destFile)
} else {
throw Error('EEXIST')

Loading…
Cancel
Save