diff --git a/chrome/content/zotero/modules/filePicker.mjs b/chrome/content/zotero/modules/filePicker.mjs index ba2b9b9d45..8082047eb6 100644 --- a/chrome/content/zotero/modules/filePicker.mjs +++ b/chrome/content/zotero/modules/filePicker.mjs @@ -201,7 +201,7 @@ FilePicker.prototype.filterVideo = 0x200; switch (prop) { case 'file': // Convert from nsIFile - val = PathUtils.normalize(val.path); + val = val.path; break; case 'files': @@ -209,7 +209,7 @@ FilePicker.prototype.filterVideo = 0x200; while (val.hasMoreElements()) { let file = val.getNext(); file.QueryInterface(Ci.nsIFile); - files.push(PathUtils.normalize(file.path)); + files.push(file.path); } val = files; break; diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index 03b6d665d3..b9b730c9d5 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -565,7 +565,7 @@ Zotero_Preferences.Attachment_Base_Directory = { if (await fp.show() != fp.returnOK) { return false; } - var newPath = fp.file; + var newPath = PathUtils.normalize(fp.file); if (oldPath && oldPath == newPath) { Zotero.debug("Base directory hasn't changed"); @@ -650,7 +650,7 @@ Zotero_Preferences.Attachment_Base_Directory = { } // Existing relative attachments not within the new base directory // will be converted to absolute paths - else if (relPath && this.getPath()) { + else if (relPath && Zotero.Prefs.get('baseAttachmentPath')) { Zotero.debug(`Converting ${relPath} to absolute path`); newAttachmentPaths[attachmentID] = attachmentPath; numOldAttachments++;