Fix attachment-title renaming bug on Windows
https://forums.zotero.org/discussion/comment/444399/#Comment_444399
This commit is contained in:
parent
64a78412c9
commit
a1f6821fe1
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue