From 41c9a4a433b84cf68669de88d4df7effb2d7a5b7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 19 Apr 2013 01:18:59 -0400 Subject: [PATCH] Fix relative path support to sync properly Dual boot and VM setups worked, but only absolute paths were synced, because syncing uses attachmentPath, which was resolving relative paths itself (#51). attachmentPath now returns what's in the database (as it did originally), and getFile() does the resolving instead. This means that anything relying on attachmentPath directly needs to be aware that it might get a placeholder-prefixed relative path. --- .../preferences/preferences_advanced.js | 28 ++- chrome/content/zotero/xpcom/attachments.js | 98 ++++++++++ chrome/content/zotero/xpcom/data/item.js | 175 ++++++------------ chrome/content/zotero/xpcom/sync.js | 4 +- chrome/content/zotero/zoteroPane.js | 3 +- 5 files changed, 178 insertions(+), 130 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences_advanced.js b/chrome/content/zotero/preferences/preferences_advanced.js index c185a358e..3fb5489de 100644 --- a/chrome/content/zotero/preferences/preferences_advanced.js +++ b/chrome/content/zotero/preferences/preferences_advanced.js @@ -364,22 +364,30 @@ Zotero_Preferences.Attachment_Base_Directory = { .createInstance(Components.interfaces.nsILocalFile); for (let i=0; i