From 978ff0e2bb927d43477f9ad768e21dc67680275a Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Thu, 19 Apr 2018 15:17:01 -0700 Subject: [PATCH] Refactor: Use correct name for sanitized filename in backup.js --- js/modules/backup.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/modules/backup.js b/js/modules/backup.js index b8158f6cf17..92069abcc23 100644 --- a/js/modules/backup.js +++ b/js/modules/backup.js @@ -457,11 +457,11 @@ async function readAttachment(dir, attachment, name, options) { options = options || {}; const { key } = options; - const anonymousName = _sanitizeFileName(name); - const targetPath = path.join(dir, anonymousName); + const sanitizedName = _sanitizeFileName(name); + const targetPath = path.join(dir, sanitizedName); if (!fs.existsSync(targetPath)) { - console.log(`Warning: attachment ${anonymousName} not found`); + console.log(`Warning: attachment ${sanitizedName} not found`); return; }