Mendeley import: Sanitize names of fetched files
This commit is contained in:
parent
faf094f0aa
commit
89d81cee41
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue