From 89d81cee417d7d4488366be4abab8f1c7d6563ef Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Thu, 20 May 2021 11:26:17 +0200 Subject: [PATCH] Mendeley import: Sanitize names of fetched files --- chrome/content/zotero/import/mendeley/mendeleyImport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index e9b3b9dfae..fdfdeadbd5 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -706,7 +706,7 @@ Zotero_Import_Mendeley.prototype._getDocumentFilesAPI = async function (document for (let doc of documents) { const files = []; for (let file of (doc.files || [])) { - const fileName = file.file_name || 'file'; + const fileName = Zotero.File.getValidFileName(file.file_name || 'file'); const tmpFile = OS.Path.join(Zotero.getTempDirectory().path, `m-api-${this.timestamp}-${file.id}`, fileName); this._tmpFilesToDelete.push(tmpFile); caller.add(this._fetchFile.bind(this, file.id, tmpFile));