Fix attachment-title renaming bug on Windows

https://forums.zotero.org/discussion/comment/444399/#Comment_444399
This commit is contained in:
Dan Stillman 2023-10-06 04:56:19 -04:00
parent 64a78412c9
commit a1f6821fe1

View file

@ -5683,7 +5683,7 @@ var ZoteroPane = new function()
var newName = Zotero.Attachments.getFileBaseNameFromItem(parentItem);
let extRE = /\.[^\.]+$/;
let origFilename = file.split("/").pop();
let origFilename = PathUtils.split(file).pop();
let ext = origFilename.match(extRE);
if (ext) {
newName = newName + ext[0];