Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Remove console.log statements to clean up the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmwalker committed Jan 17, 2014
1 parent df61c70 commit 99106ac
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/wrench.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ exports.rmdirSyncRecursive = function(path, failSilent) {
try {
files = fs.readdirSync(path);
} catch (err) {
console.log('Error "' + err.message + '"\n');

if(failSilent) return;
throw new Error(err.message);
Expand All @@ -152,23 +151,20 @@ exports.rmdirSyncRecursive = function(path, failSilent) {
} else if(currFile.isSymbolicLink()) {
// Unlink symlinks
if (isWindows) {
console.log('Remove file "' + file + '"\n');
fs.chmodSync(file, 666) // Windows needs this unless joyent/node#3006 is resolved..
}

fs.unlinkSync(file);
} else {
// Assume it's a file - perhaps a try/catch belongs here?
if (isWindows) {
console.log('Remove file "' + file + '"\n');
fs.chmodSync(file, 666) // Windows needs this unless joyent/node#3006 is resolved..
}

fs.unlinkSync(file);
}
}

console.log('Remove dir "' + path + '"\n');
/* Now that we know everything in the sub-tree has been deleted, we can delete the main
directory. Huzzah for the shopkeep. */
return fs.rmdirSync(path);
Expand Down

0 comments on commit 99106ac

Please sign in to comment.