Additional debugging for putContentsAsync freeze
This commit is contained in:
parent
f2034eec29
commit
98b7ab78d5
|
@ -248,6 +248,7 @@ Zotero.File = new function(){
|
|||
if (typeof data == 'string'
|
||||
&& Zotero.platformMajorVersion >= 19
|
||||
&& (!charset || charset.toLowerCase() == 'utf-8')) {
|
||||
Zotero.debug('Saving contents using OS.File');
|
||||
let encoder = new TextEncoder();
|
||||
let array = encoder.encode(data);
|
||||
return Q(OS.File.writeAtomic(
|
||||
|
@ -258,6 +259,7 @@ Zotero.File = new function(){
|
|||
}
|
||||
))
|
||||
.catch(function (e) {
|
||||
Zotero.debug(e); // TEMP
|
||||
if (e instanceof OS.File.Error) {
|
||||
Zotero.debug(e);
|
||||
Zotero.debug(e.toString());
|
||||
|
@ -267,6 +269,7 @@ Zotero.File = new function(){
|
|||
});
|
||||
}
|
||||
else {
|
||||
Zotero.debug('Saving contents using asyncCopy');
|
||||
// Create a stream for async stream copying
|
||||
if(!(data instanceof Components.interfaces.nsIInputStream)) {
|
||||
var converter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].
|
||||
|
|
|
@ -929,7 +929,7 @@ Zotero.Fulltext = new function(){
|
|||
cacheFile = self.getItemCacheFile(itemID);
|
||||
|
||||
Zotero.debug("Writing full-text content to " + cacheFile.path);
|
||||
return Zotero.File.putContentsAsync(cacheFile, data.text, "UTF-8");
|
||||
return Zotero.File.putContentsAsync(cacheFile, data.text);
|
||||
})
|
||||
.then(function () {
|
||||
Zotero.Fulltext.indexString(
|
||||
|
|
Loading…
Reference in New Issue
Block a user