Comparing version 1.5.3 to 1.5.4
@@ -358,26 +358,21 @@ /* wrench.js | ||
<<<<<<< HEAD | ||
if(typeof failSilent === 'function') | ||
clbk = failSilent; | ||
======= | ||
if(typeof failSilent === 'function') | ||
clbk = failSilent; | ||
>>>>>>> 7827a700ff8cb8b742e401e9876e86a63ae0c68a | ||
(function rmFile(err){ | ||
if (err) return clbk(err); | ||
(function rmFile(err){ | ||
var filename = files.shift(); | ||
if (filename === null || typeof filename == 'undefined') | ||
return fs.rmdir(dir, clbk); | ||
var file = dir+'/'+filename; | ||
fs.lstat(file, function(err, stat){ | ||
if (err) return clbk(err); | ||
var filename = files.shift(); | ||
if (filename === null || typeof filename == 'undefined') | ||
return fs.rmdir(dir, clbk); | ||
var file = dir+'/'+filename; | ||
fs.lstat(file, function(err, stat){ | ||
if (err) return clbk(err); | ||
if (stat.isDirectory()) | ||
rmdirRecursive(file, rmFile); | ||
else | ||
fs.unlink(file, rmFile); | ||
}); | ||
})(); | ||
if (stat.isDirectory()) | ||
rmdirRecursive(file, rmFile); | ||
else | ||
fs.unlink(file, rmFile); | ||
}); | ||
})(); | ||
}); | ||
@@ -398,28 +393,15 @@ }; | ||
fs.stat(newDir, function(err, newDirStat){ | ||
fs.stat(newDir, function(err, newDirStat) { | ||
if(!err) { | ||
<<<<<<< HEAD | ||
if(typeof opts !== 'undefined' && typeof opts !== 'function' && opts.forceDelete) | ||
return exports.rmdirRecursive(newDir, function(err) { | ||
copyDirRecursive.apply(this, originalArguments); | ||
}); | ||
else | ||
return clbk(new Error('You are trying to delete a directory that already exists. Specify forceDelete in an options object to override this.')); | ||
} | ||
if(typeof opts !== 'undefined' && typeof opts !== 'function' && opts.forceDelete) | ||
return exports.rmdirRecursive(newDir, function(err) { | ||
copyDirRecursive.apply(this, originalArguments); | ||
}); | ||
else | ||
return clbk(new Error('You are trying to delete a directory that already exists. Specify forceDelete in an options object to override this.')); | ||
} | ||
if(typeof opts === 'function') | ||
clbk = opts; | ||
======= | ||
if(typeof opts !== 'undefined' && typeof opts !== 'function' && opts.forceDelete) | ||
return exports.rmdirRecursive(newDir, function(err){ | ||
copyDirRecursive.apply(this, arguments); | ||
}); | ||
else | ||
return clbk(new Error('You are trying to delete a directory that already exists. Specify forceDelete in an options object to override this.')); | ||
} | ||
if(typeof opts === 'function') | ||
clbk = opts; | ||
>>>>>>> 7827a700ff8cb8b742e401e9876e86a63ae0c68a | ||
fs.stat(srcDir, function(err, srcDirStat){ | ||
@@ -426,0 +408,0 @@ if (err) return clbk(err); |
{ | ||
"name": "wrench", | ||
"description": "Recursive filesystem (and other) operations that Node *should* have.", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"author": "Ryan McGrath <ryan@venodesigns.net>", | ||
@@ -6,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32821
645