Refactor: Use correct name for sanitized filename in backup.js

pull/1/head
Scott Nonnenberg 7 years ago
parent 770410ee88
commit 978ff0e2bb
No known key found for this signature in database
GPG Key ID: 5F82280C35134661

@ -457,11 +457,11 @@ async function readAttachment(dir, attachment, name, options) {
options = options || {}; options = options || {};
const { key } = options; const { key } = options;
const anonymousName = _sanitizeFileName(name); const sanitizedName = _sanitizeFileName(name);
const targetPath = path.join(dir, anonymousName); const targetPath = path.join(dir, sanitizedName);
if (!fs.existsSync(targetPath)) { if (!fs.existsSync(targetPath)) {
console.log(`Warning: attachment ${anonymousName} not found`); console.log(`Warning: attachment ${sanitizedName} not found`);
return; return;
} }

Loading…
Cancel
Save