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
This commit is contained in:
parent
3df1a9b812
commit
d73a6f8a11
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue