Skip to content

Commit

Permalink
remove redundant if statement from delete method.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jan 10, 2015
1 parent 4f65d42 commit fb1e38e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/delete.js
Expand Up @@ -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();
}
4 changes: 2 additions & 2 deletions lib/fs_delete.js
Expand Up @@ -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);
Expand All @@ -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);
}
});
Expand Down

0 comments on commit fb1e38e

Please sign in to comment.