Better logging when revealing attachment in filesystem

This commit is contained in:
Dan Stillman 2017-06-08 14:10:41 -04:00
parent 8913178cf2
commit 98544edde5
2 changed files with 3 additions and 1 deletions

View file

@ -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"]

View file

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