diff --git a/app/lib/fslogger.js b/app/lib/fslogger.js index fad4453..f39de56 100644 --- a/app/lib/fslogger.js +++ b/app/lib/fslogger.js @@ -216,8 +216,8 @@ FsLogger.prototype._deleteOldFiles = function(folder, callback) { files.forEach(function(file) { if ( - (file.indexOf('.log')) && - (file.indexOf('StorjDrive')) && + (file.indexOf('.log') !== -1) && + (file.indexOf('StorjDrive') !== -1) && (file.indexOf(days[0]) === -1) && (file.indexOf(days[1]) === -1) ) {