commit a334ac9f60ae10c44c1b8883806148d3661d5ff4 parent 2b8c28ccaf7af8485981cf6df85140fac2cfcd5f Author: Simon Kornblith <simon@simonster.com> Date: Wed, 3 Apr 2013 14:37:14 -0400 Properly install styles with BOMs from disk Diffstat:
| M | 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 @@ -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);