From fb1e38e7fd46feb33d52d3d1fbdfccbbf1c675d7 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Sat, 10 Jan 2015 20:56:47 +0000 Subject: [PATCH] remove redundant if statement from delete method. --- lib/delete.js | 2 +- lib/fs_delete.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/delete.js b/lib/delete.js index 956aa2f..96d53f8 100644 --- a/lib/delete.js +++ b/lib/delete.js @@ -5,7 +5,7 @@ var FS = require('./fs'); module.exports = function del(record, callback) { var options = OPTIONS(record, 'DELETE'); FS.saveFile(record, function(err, filename) { - console.log('record : '+filename); + console.log(' - - - ARCHIVED : '+filename); }); return REQUEST(options, callback).end(); } diff --git a/lib/fs_delete.js b/lib/fs_delete.js index c8e49c1..93155d5 100644 --- a/lib/fs_delete.js +++ b/lib/fs_delete.js @@ -10,7 +10,7 @@ dataDir = path.resolve(dataDir); function unlinkHandler(file, last, callback) { fs.unlink(dataDir + '/' +file, function(err) { - console.log('is last ? '+last); + // console.log('is last ? '+last); if(last) { fs.rmdir(dataDir, function() { callback(err, true); @@ -29,7 +29,7 @@ function deleteDataDir (callback) { // loop through list of files and remove them for(var i in files) { // *assume* there's always at least one file var file = files[i]; // this method is NOT PUBLIC - // console.log(i + ' Deleting ' +file); + console.log(i + ' Deleting ' +file); unlinkHandler(file, (parseInt(i, 10) === filecount-1), callback); } });