From a1f6821fe1f8735e0953b2319b0ddfec0afe6f52 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 6 Oct 2023 04:56:19 -0400 Subject: [PATCH] Fix attachment-title renaming bug on Windows https://forums.zotero.org/discussion/comment/444399/#Comment_444399 --- chrome/content/zotero/zoteroPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index b44ceeb9f1..fc613172d6 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -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];