From a334ac9f60ae10c44c1b8883806148d3661d5ff4 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 3 Apr 2013 14:37:14 -0400 Subject: [PATCH] Properly install styles with BOMs from disk --- chrome/content/zotero/xpcom/style.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 10ad1b3648..a8c3ab24f2 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -187,9 +187,9 @@ Zotero.Styles = new function() { var styleInstalled; if(style instanceof Components.interfaces.nsIFile) { // handle nsIFiles - origin = style.leafName; - styleInstalled = Zotero.File.getContentsAsync(style).when(function(style) { - return _install(style, origin); + var url = Services.io.newFileURI(style); + styleInstalled = Zotero.HTTP.promise("GET", url.spec).when(function(xmlhttp) { + return _install(xmlhttp.responseText, style.leafName); }); } else { styleInstalled = _install(style, origin);