www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 50934eef0c0b4275677ee75fa9223d0e1d756d51
parent 498489f8c3a32c1c5507d80bada5eb00de1953d2
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 20 Sep 2010 02:50:24 +0000

support importing on Windows and *NIX


Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 23+++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -618,11 +618,30 @@ var Zotero = new function(){ // if standalone and no directory yet, check Firefox directory // or if in Firefox and no directory yet, check standalone Zotero directory if(!file.exists()) { + if(Zotero.isStandalone) { + if(Zotero.isWin) { + var path = "../Mozilla/Firefox"; + } else if(Zotero.isMac) { + var path = "../Firefox"; + } else { + var path = "../.mozilla/firefox"; + } + } else { + if(Zotero.isWin) { + var path = "../../Zotero"; + } else if(Zotero.isMac) { + var path = "../Zotero"; + } else { + var path = "../../.zotero"; + } + } + // get Firefox directory var prefDir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) - .get("DefProfRt", Components.interfaces.nsILocalFile).parent.parent; - prefDir.append(Zotero.isStandalone ? "Firefox" : "Zotero"); + .get("DefProfRt", Components.interfaces.nsILocalFile).parent + .QueryInterface(Components.interfaces.nsILocalFile); + prefDir.appendRelativePath(path); // get default profile var defProfile = getDefaultProfile(prefDir);