From 002dd66e0366ced5a1690e4ec87aa74a848eba32 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 23 Mar 2016 01:52:59 -0400 Subject: [PATCH] Restore proper error for Show File on missing file --- chrome/content/zotero/zoteroPane.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 46b6c75869..feff5a1153 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3940,8 +3940,9 @@ var ZoteroPane = new function() this.showAttachmentInFilesystem = Zotero.Promise.coroutine(function* (itemID, noLocateOnMissing) { var attachment = yield Zotero.Items.getAsync(itemID) if (attachment.attachmentLinkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) { - var file = attachment.getFile(); - if (file) { + var path = yield attachment.getFilePathAsync(); + if (path) { + let file = Zotero.File.pathToFile(path); try { file.reveal(); }