From 98544edde567ee22be20c3c68854221c1651fe62 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 8 Jun 2017 14:10:41 -0400 Subject: [PATCH] Better logging when revealing attachment in filesystem --- chrome/content/zotero/xpcom/zotero.js | 3 ++- chrome/content/zotero/zoteroPane.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 9812caaa01..ecfd230ba4 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -948,6 +948,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); this.launchFile = function (file) { file = Zotero.File.pathToFile(file); try { + Zotero.debug("Launching " + file.path); file.launch(); } catch (e) { @@ -967,7 +968,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); .createInstance(Components.interfaces.nsILocalFile); exec.initWithPath(path); if (!exec.exists()) { - throw (path + " does not exist"); + throw new Error(path + " does not exist"); } var proc = Components.classes["@mozilla.org/process/util;1"] diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 4caf2b7fe7..088cc462c3 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -4219,6 +4219,7 @@ var ZoteroPane = new function() if (path) { let file = Zotero.File.pathToFile(path); try { + Zotero.debug("Revealing " + file.path); file.reveal(); } catch (e) {