Properly install styles with BOMs from disk

This commit is contained in:
Simon Kornblith 2013-04-03 14:37:14 -04:00
parent 2b8c28ccaf
commit a334ac9f60

View file

@ -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);