From b1eb2b6de595a561a763f748aba1fabb3eeabf15 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 20 Mar 2016 22:17:30 -0400 Subject: [PATCH] Cleaner debug message when getting contents from input stream --- chrome/content/zotero/xpcom/file.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 3852b544f..443a4153d 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -205,7 +205,9 @@ Zotero.File = new function(){ */ this.getContentsAsync = function (source, charset, maxLength) { Zotero.debug("Getting contents of " - + (source instanceof Components.interfaces.nsIFile ? source.path : source)); + + (source instanceof Components.interfaces.nsIFile + ? source.path + : (source instanceof Components.interfaces.nsIInputStream ? "input stream" : source))); // If path is given, convert to file:// URL if (typeof source == 'string' && !source.match(/^file:/)) {