Cleaner debug message when getting contents from input stream

This commit is contained in:
Dan Stillman 2016-03-20 22:17:30 -04:00
parent 7010742527
commit b1eb2b6de5

View file

@ -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:/)) {