www

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

commit 7b72d470704b1256b9d9cdb7a50ef428ada5aa6c
parent 915542e6967825b0aeee80d7ba93c144a5e0fb9e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 13 Apr 2015 02:39:36 -0400

Zotero.File.putContentsAsync() fixes

Breakage from e6ccca3230

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

diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js @@ -328,7 +328,7 @@ Zotero.File = new function(){ */ this.putContentsAsync = function putContentsAsync(path, data, charset) { if (path instanceof Ci.nsIFile) { - path = this.fileToPath(path); + path = path.path; } if (typeof data == 'string' && (!charset || charset.toLowerCase() == 'utf-8')) { @@ -355,7 +355,7 @@ Zotero.File = new function(){ } var deferred = Zotero.Promise.defer(), - ostream = FileUtils.openSafeFileOutputStream(file); + ostream = FileUtils.openSafeFileOutputStream(path); NetUtil.asyncCopy(data, ostream, function(inputStream, status) { if (!Components.isSuccessCode(status)) { deferred.reject(new Components.Exception("File write operation failed", status));