Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wrench

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wrench - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

64

lib/wrench.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc