From 76aa54f22cc9212a4a7ed993b83e7f9b26817449 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 8 Mar 2017 23:01:25 -0700 Subject: [PATCH] Don't try to log error that doesn't exist --- core/scanner_tossers/ftn_bso.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index 145b230d..adf266f5 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -1190,7 +1190,9 @@ function FTNMessageScanTossModule() { rejects.includes(bundleFile.path) ? 'reject' : 'good', () => { fs.unlink(bundleFile.path, err => { - Log.error( { path : bundleFile.path, error : err.message }, 'Failed unlinking bundle'); + if(err) { + Log.error( { path : bundleFile.path, error : err.message }, 'Failed unlinking bundle'); + } return nextFile(null); }); }