Merge pull request #67 from Krinkle/patch-1

copyDirSyncRecursive: Remove obsolete typeof check
This commit is contained in:
Ryan McGrath 2014-01-17 18:37:10 -08:00
commit ad15e015eb

View file

@ -232,7 +232,7 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
try { try {
if(fs.statSync(newDirLocation).isDirectory()) { if(fs.statSync(newDirLocation).isDirectory()) {
if(typeof opts !== 'undefined' && opts.forceDelete) { if(opts.forceDelete) {
exports.rmdirSyncRecursive(newDirLocation); exports.rmdirSyncRecursive(newDirLocation);
} else { } else {
return new Error('You are trying to delete a directory that already exists. Specify forceDelete in the opts argument to override this. Bailing~'); return new Error('You are trying to delete a directory that already exists. Specify forceDelete in the opts argument to override this. Bailing~');