From d73a6f8a113030e9a4adc911b0c1309748d17b71 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 1 Jul 2024 03:50:37 -0400 Subject: [PATCH] Fix PathUtils.joinRelatve() error when changing LABD on Windows We store relative paths with forward slashes, but PathUtils requires platform-specific slashes, so it was failing with NS_ERROR_FILE_UNRECOGNIZED_PATH. https://forums.zotero.org/discussion/115552/zotero-7-path-problem --- chrome/content/zotero/preferences/preferences_advanced.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index c430312efd..315a69bb48 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -623,6 +623,8 @@ Zotero_Preferences.Attachment_Base_Directory = { let storedPath = attachment.attachmentPath; if (storedPath.startsWith(Zotero.Attachments.BASE_PATH_PLACEHOLDER)) { relPath = storedPath.substr(Zotero.Attachments.BASE_PATH_PLACEHOLDER.length); + // Use platform-specific slashes, which PathUtils.joinRelative() requires below + relPath = Zotero.Attachments.fixPathSlashes(relPath); } } catch (e) {